Add test for skipped initial days in Temporal.Calendar.prototype.yearMonthFromFields#4080
Closed
Add test for skipped initial days in Temporal.Calendar.prototype.yearMonthFromFields#4080
Conversation
Contributor
|
I think that might indeed be a misinterpretation of that step. That January spans two era/eraYear pairs, Showa 64 and Heisei 1. It's not two separate Januaries, so the PlainYearMonth correctly resolves to the era/eraYear pair in effect at the beginning of the month. firstDayIndex is only intended to not be 1 if the calendar skips days at the beginning of the month outright, which none of the current ICU calendars do. (The only occurrence I'm aware of is in the switch from Julian to Gregorian calendar in some European regions, where they skipped days at the beginning of the month rather than in the middle.) See also tc39/proposal-temporal#1315 and tc39/proposal-temporal#1300. |
ptomato
added a commit
to ptomato/test262
that referenced
this pull request
Apr 25, 2025
See note 2 on eras in CalendarResolveFields: https://tc39.es/proposal-temporal/#sec-temporal-calendarresolvefields This behaviour was not yet covered by any test262 tests. Based on Anba's tests from tc39#4080 but with different behaviour.
Contributor
|
Superseded by #4461. |
ptomato
added a commit
to ptomato/test262
that referenced
this pull request
Apr 25, 2025
See note 2 on eras in CalendarResolveFields: https://tc39.es/proposal-temporal/#sec-temporal-calendarresolvefields This behaviour was not yet covered by any test262 tests. Based on Anba's tests from tc39#4080 but with different behaviour.
Ms2ger
pushed a commit
that referenced
this pull request
Apr 29, 2025
See note 2 on eras in CalendarResolveFields: https://tc39.es/proposal-temporal/#sec-temporal-calendarresolvefields This behaviour was not yet covered by any test262 tests. Based on Anba's tests from #4080 but with different behaviour.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The polyfill doesn't pass this test:
Is this a bug in the polyfill or did I misinterpret this step from Temporal.Calendar.prototype.yearMonthFromFields?