-
Notifications
You must be signed in to change notification settings - Fork 8
Normative: Ignore "islamic-rgsa" calendar in DateTimeFormat #99
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
base: main
Are you sure you want to change the base?
Conversation
Following guidance in [issue tc39#29 conversation](tc39#29 (comment)), this PR causes the value of `"ca"` to be removed from the `_options_` of `CreateDateTimeFormat` when the value of `_options_.[[ca]]` is "islamic-rgsa". This calendar matches no calendar in actual use and should be ignored.
cff02fb to
3ade73a
Compare
"islamic-rgsa" calendar option
ptomato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the discussion from yesterday's TG2 I think here's what we need to change in this PR:
- delete the added text, it's no longer relevant
- delete the "islamic-rgsa" from the If-clause a few lines lower down
- change the fallbackCalendar and CanonicalizeUValue lines to simply "Set resolvedCalendar to "islamic-tbla"."
- in AvailableCalendars, change "The List must include" to "The List must consist of"
3ade73a to
be6c4b1
Compare
|
Updated per @ptomato's suggestion |
ptomato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't occur to me before, but I think this section also needs to change. At least "even if supporting only the calendars from Table 1" needs to be rephrased, since it's now required to support only the calendars from Table 1.
Possibly something like "This list may include calendar types not listed in Table 1"?
…ion for internal slots of Intl.DateTimeFormat constructor
ptomato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized we additionally need to comb through the proposal and remove any language that says "If calendar is not listed in Table 1, return an implementation-defined value" — that will no longer be allowed.
…bleCalendars`, no longer "must include" all the calendar types in Table 1 (Calendar types described in CLDR), but instead must entirely consist of the calendar types in Table 1. As a result, `AvailableCalendars` and two other AOs: * `CalendarExtraFields` * `NonISOFieldKeysToIgnore` are likewise not implementation-defined. Steps in these AOs returning implementation-defined values for calendar types not in Table 1 have been removed.
|
As of the last commit this PR would fix #94 |
|
Is there anything in particular blocking this from landing? |
|
It needs to be presented to TG1, no? |
hsivonen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| <dl class="header"> | ||
| <dt>description</dt> | ||
| <dd>The returned List is sorted according to lexicographic code unit order, and contains unique calendar types in canonical form (<emu-xref href="#sec-calendar-types"></emu-xref>) identifying the calendars for which the implementation provides the functionality of Intl.DateTimeFormat objects, including their aliases (e.g., <del>either</del> both <del>or neither of</del> *"islamicc"* and *"islamic-civil"*). The List must include <del>*"iso8601"*</del><ins>the Calendar Type value of every row of <emu-xref href="#table-calendar-types"></emu-xref>, except the header row</ins>.</dd> | ||
| <dd>The returned List is sorted according to lexicographic code unit order, and contains unique calendar types in canonical form (<emu-xref href="#sec-calendar-types"></emu-xref>) identifying the calendars for which the implementation provides the functionality of Intl.DateTimeFormat objects, including their aliases (e.g., <del>either</del> both <del>or neither of</del> *"islamicc"* and *"islamic-civil"*). The List must consist of <del>*"iso8601"*</del><ins>the Calendar Type value of every row of <emu-xref href="#table-calendar-types"></emu-xref>, except the header row</ins>.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"consist of" implies that the returned list must be constrained to the following table, which is not the case.
| <dd>The returned List is sorted according to lexicographic code unit order, and contains unique calendar types in canonical form (<emu-xref href="#sec-calendar-types"></emu-xref>) identifying the calendars for which the implementation provides the functionality of Intl.DateTimeFormat objects, including their aliases (e.g., <del>either</del> both <del>or neither of</del> *"islamicc"* and *"islamic-civil"*). The List must consist of <del>*"iso8601"*</del><ins>the Calendar Type value of every row of <emu-xref href="#table-calendar-types"></emu-xref>, except the header row</ins>.</dd> | |
| <dd>The returned List is sorted according to lexicographic code unit order, and contains unique calendar types in canonical form (<emu-xref href="#sec-calendar-types"></emu-xref>) identifying the calendars for which the implementation provides the functionality of Intl.DateTimeFormat objects, including their aliases (e.g., <del>either both or neither of</del><ins>both</ins> *"islamicc"* and *"islamic-civil"*). The List must include <del>*"iso8601"*</del><ins>the Calendar Type value of every row of <emu-xref href="#table-calendar-types"></emu-xref>, except the header row</ins>.</dd> |
| 1. Assert: IsValidMonthCodeForCalendar(_calendar_, _monthCode_) is *true*. | ||
| 1. If YearContainsMonthCode(_calendar_, _arithmeticYear_, _monthCode_) is *true*, return _monthCode_. | ||
| 1. If _overflow_ is ~reject~, throw a *RangeError* exception. | ||
| 1. If _calendar_ is not listed in the Calendar Type column of <emu-xref href="#table-calendar-types"></emu-xref>, return an implementation-defined value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these implementation-defined steps being removed? AFAIK, they are necessary to retain for implementations supporting non-required calendar types to still be conforming.
1. If _calendar_ is not listed in the Calendar Type column of <emu-xref href="#table-calendar-types"></emu-xref>, return an implementation-defined value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the conclusion from TG2, that implementations supporting non-required calendar types should not be conforming: https://docs.google.com/document/d/1AIsV-xXMWZ6fUX27Gw1UsIswmfcMZEjhdz3adla8lso/edit?tab=t.0#heading=h.vtb7plo5cjtx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a point raised, but AFAICT not a conclusion. But at any rate, the contents of this PR currently lack internal consistency regarding whether or not the list is exhaustive.
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
|
|
||
| <ul> | ||
| <li><ins>[[LocaleData]].[[<_locale_>]].[[ca]] must be a List consisting of calendar types. Specifically, even if supporting only the calendars from <emu-xref href="#table-calendar-types"></emu-xref>, the list may also include *"islamic"* and *"islamic-rgsa"*.</ins></li> | ||
| <li><ins>[[LocaleData]].[[<_locale_>]].[[ca]] must be a List consisting of calendar types. It may include calendar types not listed in <emu-xref href="#table-calendar-types"></emu-xref>.</ins></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, any browser calendar values from locales should only be supported Temporal calendars. An explicit -u-ca need not be supported, but the CLDR data needs to all be supported.
Following guidance in issue #29 conversation, this PR causes the value of
"ca"to be removed from the_options_ofCreateDateTimeFormatwhen the value of_options_.[[ca]]is"islamic-rgsa". This calendar matches no calendar in actual use and should be ignored.fix #94