ThreeTen / threeten

This project was the home of code used to develop a modern date and time library for JDK8. Development has moved to OpenJDK and a separate backport project, threetenbp.
http://threeten.github.io/
191 stars 37 forks source link

Japanese YearOfEra maximum #325

Closed jodastephen closed 10 years ago

jodastephen commented 11 years ago

The maximum year-of-era should be 1868, not based on the start of the current era. This corresponds to the end of Seireki.

jodastephen commented 11 years ago

This issue covers all work to confirm the boundaries between eras, and whether these are part of the spec of JapaneseEra or only defined in the config file (which I assume can be replaced by users to enter a new era)

RogerRiggs commented 10 years ago

bugs.sun.com issue is 8023031

masa310 commented 10 years ago

Does it mean that JapaneseDate covers up to 3856-12-31 (ISO)?

RogerRiggs commented 10 years ago

This may no longer be an issue. The current code for JapaneseDate(YEAR_OF_ERA) delegates to the Japanese Calendar in java.util using getActualMaximum(). So it is exact for all but the current Era and nearly MAX_INT for the current era. The original issue was based on SEIREKI; which has been removed.

RogerRiggs commented 10 years ago

Range(YEAR_OF_ERA) correctly returns the year for the previous Era and very large number for the current Era (292277006). Closing as no longer an issue.