-
Notifications
You must be signed in to change notification settings - Fork 8
Description
@sffc came to my cube and mentioned some people suggested we delegate / forward of the era code to another standard, in Unicode code instead.
Here are what currently CLDR define for era code:
https://github.com/unicode-org/cldr/blob/main/common/supplemental/supplementalData.xml#:~:text=%3CcalendarData%3E
in the type attribute of the <eras>
<calendarData>
<calendar type="gregorian">
<calendarSystem type="solar" />
<eras>
<era type="0" end="0-12-31" />
<era type="1" start="1-01-01" />
</eras>
</calendar>
<calendar type="generic"/>
<!-- gregorian territories are assumed, so these are all in addition -->
<calendar type="japanese">
<calendarSystem type="solar" />
<eras>
...
<era type="233" start="1912-7-30"/>
<era type="234" start="1926-12-25"/>
<era type="235" start="1989-1-8"/>
<era type="236" start="2019-5-1"/>
</eras>
</calendar>
<calendar type="islamic">
<calendarSystem type="lunar" />
<eras>
<era type="0" start="622-7-15"/>
</eras>
</calendar>
<calendar type="islamic-civil">
<calendarSystem type="lunar" />
<eras>
<era type="0" start="622-7-16"/>
</eras>
</calendar>
<calendar type="islamic-rgsa">
<calendarSystem type="lunar" />
<eras>
<era type="0" start="622-7-15"/>
</eras>
</calendar>
<calendar type="islamic-tbla">
<calendarSystem type="lunar" />
<eras>
<era type="0" start="622-7-15"/>
</eras>
</calendar>
<calendar type="islamic-umalqura">
<calendarSystem type="lunar" />
<eras>
<era type="0" start="622-7-15"/>
</eras>
</calendar>
<calendar type="chinese">
<calendarSystem type="lunisolar"/>
<eras>
<era type="0" start="-2636-01-01"/> <!-- 'sequential' year -->
</eras>
</calendar>
<calendar type="hebrew">
<calendarSystem type="lunisolar"/>
<eras>
<era type="0" start="-3760-10-7"/>
</eras>
</calendar>
<calendar type="buddhist">
<calendarSystem type="solar" />
<eras>
<era type="0" start="-542-01-01"/>
</eras>
</calendar>
<calendar type="coptic">
<calendarSystem type="other"/>
<eras>
<era type="0" end="284-08-28"/>
<era type="1" start="284-08-29"/>
</eras>
</calendar>
<calendar type="persian">
<calendarSystem type="solar"/>
<eras>
<era type="0" start="622-01-01"/>
</eras>
</calendar>
<calendar type="dangi">
<calendarSystem type="lunisolar"/>
<eras>
<era type="0" start="-2332-01-01"/> <!-- 'sequential' year -->
</eras>
</calendar>
<calendar type="ethiopic">
<calendarSystem type="other"/>
<eras>
<era type="0" end="8-08-28"/>
<era type="1" start="8-08-29"/>
</eras>
</calendar>
<calendar type="ethiopic-amete-alem">
<eras>
<era type="0" end="-5492-08-29"/>
</eras>
</calendar>
<calendar type="indian">
<eras>
<era type="0" start="79-01-01"/>
</eras>
</calendar>
<calendar type="roc">
<eras>
<era type="0" end="1911-12-31"/>
<era type="1" start="1912-01-01"/>
</eras>
</calendar>
</calendarData>
I do not think for JavaScript web developer, using "0", "1", "233", "234", "235", "236" has good readability. If you prefer to use these 6 values which defined in CLDR for era code, please express a support. If you prefer NOT to use these 6 values which defined in CLDR for era code, please also express your oppisition.
I think we should define string map to these defintion, but not use these value in the API surface. for example, we should map "bce" to type="0" in gregorian calendar, and "mg" map to type="1" in roc calendar.