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

Calendar naming convention #97

Closed dchiba closed 11 years ago

dchiba commented 11 years ago

The namespace of the calendar is not clearly specified. The documentation including javadoc should explicitly state CLDR calendar names are used.

Formal definitions at: http://unicode.org/repos/cldr/trunk/common/bcp47/calendar.xml

jodastephen commented 11 years ago

There appear to be two sets of sensible names - the CLDR id and a name more appropriate for human use. For example, "Minguo" rather than "roc", or "ThaiBuddhist" rather than "buddhist". We shouldn't be constrained by CLDR here, as they are intended as IDs.

The current chronology class has support for both name and CLDR id.

dchiba commented 11 years ago

For identifying calendars on application UI, display names should be translatable. #100 filed for this requirement.

For internal ID purposes, I agree defining developer friendly alternate IDs may be available, as far as they are an alias of a CLDR ID.

jodastephen commented 11 years ago

Agreed to make getLocaleId() method public. Make ofName() accept either id.

RogerRiggs commented 11 years ago

The method name should be changed to getTypeId to match the nomenclature used by CLDR and BCP47.

jodastephen commented 11 years ago

The method getCalendarType() appears to have been added to Calendar in JDK 8. It would make sense to have a similar method name in both places.

RogerRiggs commented 11 years ago

Fixes #97; adds getCalendarType and updates corresponding calendar type ids and tests

Commit https://github.com/RogerRiggs/threeten/commit/39a9419f0c7b9659cca463cd8c02c6b4701e2e04

dchiba commented 11 years ago

Hijrah -> islamicc (Yes this should this be islamicc. This clarification is #118.)