Open anba opened 2 weeks ago
This should be deferred to experts in those calendars, but the current era info in the polyfill comes from Intl.DateTimeFormat
:
> new Intl.DateTimeFormat('en', {calendar: 'buddhist'}).format(Date.now())
'6/27/2567 BE'
The era is possibly only displayed for English to disambiguate from the Gregorian calendar. When using locales which actually use the calendars, no era is displayed:
js> new Intl.DateTimeFormat("th", {calendar: "buddhist"}).format(Date.now())
"27/6/2567"
js> new Intl.DateTimeFormat("fa", {calendar: "persian", numberingSystem: "latn"}).format(Date.now())
"1403/4/7"
js> new Intl.DateTimeFormat("am", {calendar: "ethioaa"}).format(Date.now())
"20/10/7516"
Oh. That explains it!
returns
"be"
instead ofundefined
. Same applies for calendarsethioaa
,indian
,islamic
(and variants), andpersian
.Calendars
chinese
,dangi
, andhebrew
correctly returnundefined
for the era.From CalendarDateEra: