-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Add calendar and numberingSystem options
This patch allows calendar and numberingSystem to be specified in the options bag of the DateTimeFormat and NumberFormat constructors. One use case for these options would be, when working with locales which have two numbering systems and calendars in use--the UA default may be the non-Western one, but in some contexts, it may be appropriate to use the Western one. Currently, without the patch, it would be necessary to parse the BCP 47 language tag in the application, but Intl provides no library to do so. For example, this all occurs in this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1370086 This patch validates the calendar and numbering system by comparing them to the grammar allowed for Unicode extension tags, per the resolution documented at #175 (comment) Related bug: #105 . This patch leaves out "collation" because of a lack of clear use cases.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters