-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Support Era names #4591
Comments
It seems Era names is not supported yet... In LDML, 'GGGG' means Era name, but moment uses 'GGGG' format as 'ISO 4 digit week year'. Related Issue
|
Yeah, you'd need a new token. Probably anything unused is fine. Remember we can't do this unless we get eras for all the locales, so this is a big feature. |
Thank u for ur advice! I think 'AC' and 'BC' is enough for almost all country (language). Anyway, I'll try this. |
Note that the Japanese era name is planning to be changing on May 1, 2019 - and the new name is not yet chosen. Here's how Microsoft is handling this in Windows. Other applications that display era names may be taking a similar approach. If we are to take this on in Moment, we should be prepared for an update. |
@mj1856 As u mentioned, Japanese era name is planning to be changing on May 1, 2019. On Linux, default definition of Japanese era is stored in In my implementation in PR #4591, era name definitions are defined in locale of moment.js. Microsoft implementation can respond to new era with a single registry entry. Please tell me if u have better idea which can respond to the new era. |
Close in favor of #4599 |
Why was this issue closed when the pull request has not been merged? Do you plan to merge in Japan imperial era support or not? |
[feature] Add era support for en,ja (closes #4591)
Description
In Japan, government agency and some company use traditional Japanese Imperial Calendar. But it seems moment.js is currently not supporting era names ~~~other than Christian Era~~~. So I want to write some patch to improve this. But I'm not familiar with this code-base. And I'm not sure whether if this can be done with unicode date format standard.
This feature is implemented as
Era
in Single Unix Specification (SU).Please refer to the following link.
http://man7.org/linux/man-pages/man3/strftime.3.html
And java has same feature implemented in
java.util.JapaneseImperialCalendar
class though i don't like this implementation.Regards.
Other information that may be helpful:
Related Issue
The text was updated successfully, but these errors were encountered: