-
Notifications
You must be signed in to change notification settings - Fork 105
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
DateTimeFormat: add support for more than two dayPeriod : CLDR's "B" and "b" #343
Comments
I think there are several other time formatting could be improved. Maybe we should put all of that into a proposal instead of dealing with that one by one. Beside B and b for dayPeriod the other two set are Q/q for quarter and W/w for week The current skeleton to pattern mapping in locales/zh.txt related to B/b Q/q and W/w
in locales/en.txt
|
I will start a proposal under ECMA402 to extend the DateTimeFormat options |
@FrankYFTang Is this issue covered by #346 ? |
yes |
In some locales, they have more than two day periods (AM/PM).
CLDR has data for flexible day periods (B) and 'am, pm, noon, midnight' (b) in addition to "AM/PM" (a). https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-period .
For instance, Chinese (zh) locale data has the following, but there is no way to format time with 'B' or 'b'.
{{{
dayPeriod{
format{
abbreviated{
afternoon1{"中午"}
afternoon2{"下午"}
evening1{"晚上"}
midnight{"午夜"}
morning1{"早上"}
morning2{"上午"}
night1{"凌晨"}
}
....
}}}
The text was updated successfully, but these errors were encountered: