andyearnshaw / Intl.js

Compatibility implementation of the ECMAScript Internationalization API (ECMA-402) for JavaScript -- UNMAINTAINED
Other
1.7k stars 215 forks source link

Support for alternate era names? #265

Open acdha opened 7 years ago

acdha commented 7 years ago

I'm not sure whether this is the appropriate spot versus https://github.com/tc39/ecma402 but I recently needed to enable eras in DateTimeFormat but need to use the secular names (BCE/CE) instead of the religious names (BC/AD). This was apparently codified in CLDR as a variant (http://unicode.org/cldr/trac/ticket/649) and the values are present in the CLDR-derived JSON files but unless I'm misreading https://github.com/andyearnshaw/Intl.js/blob/68514268e4f6b97a9323f6be9e75bd5a1216777a/src/12.datetimeformat.js#L1129 there appears to be no way to select them.

caridy commented 7 years ago

We will need some investigation here. If the data is in CLDR, and if browsers support this feature. Can you provide examples of the result from modern browsers?