Closed MenoData closed 8 years ago
Some notes:
DayPeriod
in discussion would implement ChronoFunction<PlainTime,String>
.Note that the Ethiopian calendar (see #389) uses a special division of the day into day periods which is not offered by CLDR-data but should be taken into account here.
Postponed to v3.12/4.9.
A new method public Map<String, String> getTextForms()
was added to class CalendarText
in order to enable specialized access to dayperiod translations.
Some preparations are done including i18n-resources, but again postponed to another release in order to release an important bugfix for HijriCalendar earlier.
ICU seems to be willing to realize this feature, too but when? The realization was postponed several times, now scheduled to release 57.1. See also:
Starting with Zulu language, some ambivalent data (source CLDR) were detected which can defeat parsing of day periods in strict mode. This affects following languages: az, et, fa, he, hi, hu, mk, pt, si, tr, zh, zu (now corrected). It is a necessary requirement that translations of day period codes must be mappable in a unique way on codes and vice versa.
Needs more investigation and correction of data. About the correction of Zulu data, see issue #420
About Chinese (zh): Some entries (下午 - in the afternoon) were mistaken instead of 中午 (noon),
Although CLDR explicitly states that the fallback rules for dayperiods should be similar to AM/PM-rules, some data didn't follow those rules (using ABBREVIATED as fallback) but followed the standard rules (using WIDE-FORMAT or NARROW-STANDALONE as fallback). This has been corrected now for some languages (especially az, bs, et, he, mn).
Furthermore, the internal dayperiod element value is now allowed to carry more than one dayperiod code in order to allow ambivalent codes in first parse phase. If all parsed codes resolve to same and unambivalent am/pm-value in second phase then final time resolving can still be successful. This flexibility makes sense especially for parsing of NARROW dayperiod values.
CLDR 28 has introduced a new concept for supporting day periods (including new pattern symbols "b" and "B"). See also:
http://cldr.unicode.org/development/development-process/design-proposals/day-period-design http://cldr.unicode.org/translation/date-time-names#TOC-Day-Periods-AM-and-PM-
Time4J might introduce a new class
DayPeriod
which can act asChronoFunction<PlainTime,String>
and offer options how to get the concrete time span and i18n-translation for a given time of day.