Open Bug 273844 Opened 20 years ago Updated 2 years ago

Add support for non- Common Era years (Buddhist Era, Heisei Era, etc.)

Categories

(Calendar :: General, enhancement)

Sunbird 0.2
enhancement

Tracking

(Not tracked)

People

(Reporter: paramai, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I'm from Thailand. My machine's default "Thai" locale uses "Buddhist era" to
represent years. The buddhist era is basically +543 to the Christian era. For
example, in this year (2004) the Buddhist era will be 2547.

The problem occurs when I try to use the date picker in Mozilla sunbird. I think
the picker tried to check the boundary of the entered year. If I selected the
current year (2547), it would be reverted back to 2542. When I trid to correct
this by press the date picket button again, it showed "undefined NaN" in the box.

Please also include the supprot for using buddhist era in the problem. So,
please do not check the boundary of the date by checking it with christian era.
So that I can use the calendar correctly.

Note that if I don't use the date picker and leave the date with the default
value provided by sunbird, I can use that date. So, the problem is I can't
create an event that spans two or more dates.

Reproducible: Always
Steps to Reproduce:
1. Choose "Thai" standards and formats in the regional and language option. Your
system year should now display Christian Era + 543 (this year (2004) = 2547)
2. Start calendar, enter a new task, enter a date

Actual Results:  
The date will not be accepted by Calendar. It tries to set back my date to 2542
which is equivalent to 1999. I don't understand how this logic works.

Expected Results:  
It should accept the Buddhist era like other programs do. If I enter 2547, it
should accept 2547.

Also it would be nice if Sunbird shows a consistent date format. In the left
mini calendar and the big right-bottom calendar, it uses christian era no matter
what regional setting you are using. But in the top-right grid, it uses the
format specified by the regional setting (Buddhist era... in my case)
Version: unspecified → Sunbird 0.2b
Assignee: shaver → mostafah
Component: Base → Sunbird and Calendar-Extension Front End
QA Contact: vladimir → brantgurganus2001
Calendar currently assumes years are Common Era years in Gregorian Calendar.

There are a few countries that use Gregorian Calendar with a different era year:
 Thailand (Buddhist Era = CE + 543), Taiwan (CE - 1911), Japan Heisei Era (CE -
1988).

It seems possible accomodate these --- basically, the display/parse year would
be different, but the underlying program would still use Common Era years.  

One issue is how to display the year.  Currently it is a narrow four digit
string, but it should be extended to include some indication of the era in the
title of the main views, at least when the era is the non-default era for a locale.

Priority may be low, as there is currently no localization for Thailand or
Taiwan, and many Japanese use Common Era dates, so the immediate benefit seems low.
Status: UNCONFIRMED → NEW
Ever confirmed: true
rfc2445 appears to not provide any method of nothing eras on dates. Therefore, I
agree with gekacheka that this is something that should be handled in rendering,
where the underlying data uses common era dates and the displays can be then
incremented.

At this point, I think this is an enhancement request. Setting to enhancement
and updating summary
Severity: major → enhancement
Summary: Sunbird Calendar does not handle the drop-down date picker correctly in the machine with buddhist era setting → Add support for non-common era years (Buddhist Era, Heisei Era, etc.)
     This i18n bug makes sunbird useless for Thai (and people in many
countries). Thai can also use Gregorian calendar. If sunbird can't handle other
eras, then it should always display and use the Gregorian calendar. 
     This bug comes from the fact that the date picker shows dates in local
calendar which it may not be able to handle. When the local calendar is anything
other than Gregorian, changing the date in the date picker will result in this
error (Undefined NaN).
QA Contact: gurganbl → sunbird
I'm not sure if the word non-common is suitable for "Buddhist Era" in a case of
Thailand, since at least 60 millions people use it in their everyday life.
The same for Heisei (and other imperial era) in Japan.
OS: Windows XP → All
Hardware: PC → All
re-spaced and capitalized in summary:  non-common era --> non- Common Era
Summary: Add support for non-common era years (Buddhist Era, Heisei Era, etc.) → Add support for non- Common Era years (Buddhist Era, Heisei Era, etc.)
*** Bug 311370 has been marked as a duplicate of this bug. ***
*** Bug 324231 has been marked as a duplicate of this bug. ***
From bug 324231 :-
Not implement this feature limit Sunbird to countries with Gregorian calendar,
leave out many other countries.
If implementing this feature is difficult, you can just always display the date
in Gregorian calendar, ignoring the system locale. Many countires including
Thai can use Gregorian calendar. Why display national calendar when you can't
change it. This unnecessary create another bug.

Please simply fix this by doing as I told first. This will make many people be able to use Sunbird. When you implement national calendars feature in the date picker, just have an option to let the users use it.
I tried running Sunbird with the option "-UILocale en-US -contentLocale EN" on Windows XP. It still displays the date boxes and date pickers in Buddhist era (I'm using Thai locale).

I think this behavior is strange. It should use Gregorial calendar. This could be a work around for this bug.

Per comment #1:
> Priority may be low, as there is currently no localization for Thailand or
> Taiwan, and many Japanese use Common Era dates, so the immediate benefit 
> seems low.

Localization is not needed for the countries to use Sunbird. They can use it in English. The only problem is the date pickers. Otherwise, I can use Sunbird comfortably. This is serious as it limits the use of Sunbird in many part of the
world.
Like other Mozilla products, sunbird is designed to use the date formatter of the operating system so that dates are consistent across all applications on the screen, and the user only has to change the format in one place.  Inconsistent format causes miscommunication, particularly when some applications use M/D/Y format and some use D/M/Y format, so it is better to avoid multiple formats if possible.

If dates with Common Era year are acceptable to you, I suggest that the simplest workaround is likely to be to change the date format of your operating system to show Common Era years.

In en-US W2k, it looks like this can be changed as follows:
  Start > Settings > Control Panel > Regional Options > 
  General Tab: with Thai language settings enabled, and locale set to Thai, 
  Date tab: Calendar Type 
    sets either Buddhist Era years (2549)
            or  Common Era years   (2006)

Sunbird's date picker seems to work with the Common Era years.  The date parser works on numerical months, but doesn't currently work on Thai spelled out months (maybe because of bug 258974), so make sure the Short date format uses a numerical month (M or MM in format) in that control panel.

(BTW, I like to set the the Long date format to "ddd d MMM yyyy" in that control panel so the event list shows me the day of the week.)
Thanks for the work around. Now SunBird works for me. I plan to use it in my office.
However, changing the system date format affect every applications including the notification bar. I thought I could use "-UILocale en-US -contentLocale EN" to make only SunBird use system en locale. But it seems to ignore the options :-(
But OK, I have a work around. At least I can use SunBird and try various features/aspects of it.
*** Bug 327617 has been marked as a duplicate of this bug. ***
Reassigning all automatically assigned bugs from Mostafa to nobody@m.o

Bugspam filter: TorontoMostafaMove
Assignee: mostafah → nobody
Version: Sunbird 0.2b → Sunbird 0.2
Component: Sunbird Only → General
QA Contact: sunbird → general
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.