era and year in ICU calendars
Calendar
GregorianCalendar
(“gregorian” / “gregory”)
Public Headers
Private Headers / Internal
TaiwanCalendar
(“roc”)
JapaneseCalendar
(“japanese”)
BuddhistCalendar
(“buddhist”)
PersianCalendar
(“persian”)
IndianCalendar
(“indian”)
IslamicCalendar
HebrewCalendar
(“hebrew”)
CECalendar
CopticCalendar
(“coptic”)
EthiopicCalendar
ChineseCalendar
(“chinese”)
DangiCalendar
(“dangi”)
Interface
Abstract Class
Concrete Class
(“key” / key in JS)
Extended Class Diagram of Calendar Classes inside ICU
(“ethiopic”)
(“ethiopic-amete-alem” / “ethioaa”)
(“key”)
Typed objects:
(“islamic”)
(“islamic-civil”)
(“islamic-umalqura”)
(“islamic-tbla”)
(“islamic-rgsa”)
(“iso8601”)
Five Different Models for year and era
I
II
IV
-2 -1 0 1 2
3 2 1 1 2
-2 -1 0 1 2
1 2
1 2
1 2
1 2
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
V
III
-2 -1 0 1 2 5499 5500 1 2
Five Different Models for year and era
-2 -1 0 1 2
3 2 1 1 2
-2 -1 0 1 2
1 2
1 2
1 2
1 2
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
One Directional Line (e.g. “iso8601”, “buddhist”, “hebrew”, “islamic”, "ethiopic-amete-alem”, etc)
Irregular Length Directional Lines (e.g. “japanese”)
Two Directional Lines Opposite Direction (e.g. “gregory”, “roc”, “copic”,)
Fixed Length Directional Lines (e.g. “chinese”, “dangi”)
Two Directional Lines Same Direction ("ethiopic")
-2 -1 0 1 2 5499 5500 1 2
I
II
IV
V
III
Calendars in ICU 71.1
I
II
III
IV
V
Type I - One Directional Line
-2 -1 0 1 2
Calendars in ICU:
Since there is only one era, there are no need to specify “era”
I
Type II - Two Directional Lines Opposite Direction
3 2 1 1 2 1970 2022
Calendars in ICU:
Should we define one single set of two values for all of them?
gregory: BC AD
3 2 1 1 2 110
roc: Before MinGuo MinGuo
3 2 1 1 2 1970 2022
coptic: BCE (Before Coptic Era) CE (Coptic Era)
3 2 1 1 2 1739
II
Type III - Two Directional Lines Same Direction
Amete Alem Amete Mihret
-2 -1 0 1 2 5499 5500 1 2 2014
Calendars in ICU:
It could be viewed as a special case of Type IV
III
"ethiopic”
Side Note: “ethiopic” vs "ethiopic-amete-alem” calendar
Amete Alem Amete Mihret
-2 -1 0 1 2 5499 5500 1 2 2014
III
"ethiopic”
-2 -1 0 1 2 5499 5500 5501 7514
I
Amete Alem
"ethiopic-amete-alem”
Type IV - Irregular Length Directional Lines
-2 -1 0 1 2
1 2
1 2
1 2
1 2
Calendars in ICU:
IV
Type V - Fixed Length Directional Lines
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
Calendars in ICU:
It is really not a true era/eraYear in the calendar, but rather a hacky way to put 60 years cycle (0..59) with a cycle sequence into year and era fields.
era = extended_year / 60 => cycle sequence
year = exteneded_year % 60 => year in the cycle
People know the “year in the cycle” in the culture
No people know about the cycle sequence
V
Five Different Models for year and era
I
II
IV
-2 -1 0 1 2
3 2 1 1 2
-2 -1 0 1 2
1 2
1 2
1 2
1 2
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
0 1 …. 59
V
III
-2 -1 0 1 2 5499 5500 1 2
Calendars in ICU 71.1
I
II
III
IV
V
Proposal to ECMA402 Intl-Temporal
In ICU4X
Why do we need to pass in an era code which can only be one value and return error if not?
Different semantic than ICU (see Type III)