Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Is there a way to control capitalization when using `DATETIME`? #299
Comments
|
@zbraniecki, any idea? I've done a tad of research, and found http://cldr.unicode.org/translation/capitalization and http://cldr.unicode.org/development/development-process/design-proposals/grammar-and-capitalization-for-date-time-elements. Which implies that anything on the CLDR/ICU front would return lower-case strings for Hungarian, even in standalone. Now, I don't know if I wonder if the least horrible solution would be to expose a |
|
So, in ECMA402 we're introducing With that in mind, we're talking about adding This will take some time to standardize and in the meantime, we do not provide a good intl coverage for capitalization rules.
etc. |
We use the
DATETIMEfilter in one of our Fluent strings to format an ISO date string to just output the weekday name (Monday):{DATETIME($isoString, weekday: "long")}Is there a way to specify whether the weekday name should be capitalized or not, regardless of the locale's capitalization rules?
In the English case, the weekday occurs in the middle of the sentence, and anyway it's not of any consequence because weekdays are capitalized in English. In Hungarian, however, the weekday ends up being the first word in the string. Because weekdays are not capitalized in Hungarian, we end up with a sentence that isn't capitalized.
Is this something we can address using Fluent alone, or should we be fixing it somewhere else in the stack?