Skip to content
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

Normative: Make CalendarDateWeekOfYear return undefined #2756

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

Aditi-1400
Copy link
Collaborator

Make CalendarDateWeekOfYear return undefined for all calendars without well-defined week calendar system

Fixes: #2744

@Aditi-1400 Aditi-1400 marked this pull request as draft January 17, 2024 17:39
@Aditi-1400 Aditi-1400 changed the title Make CalendarDateWeekOfYear return undefined Normative: Make CalendarDateWeekOfYear return undefined Jan 17, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (737baf2) 96.56% compared to head (f5b3edb) 96.61%.

Files Patch % Lines
polyfill/lib/calendar.mjs 95.83% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2756      +/-   ##
==========================================
+ Coverage   96.56%   96.61%   +0.04%     
==========================================
  Files          23       23              
  Lines       12277    12309      +32     
  Branches     2271     2271              
==========================================
+ Hits        11855    11892      +37     
+ Misses        360      355       -5     
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After initially reviewing this I thought of something else that needs to be done. We should change CalendarWeekOfYear and CalendarYearOfWeek so that a custom calendar's weekOfYear and yearOfWeek method can return undefined. (Similar to what we do in CalendarEra and CalendarEraYear.) This is also something we could write test262 tests for.

spec/intl.html Show resolved Hide resolved
@Aditi-1400 Aditi-1400 force-pushed the temporal-2744 branch 2 times, most recently from 41db8dc to 01a7d8d Compare January 26, 2024 22:03
@Aditi-1400 Aditi-1400 marked this pull request as ready for review January 26, 2024 22:05
Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks!

@ptomato ptomato marked this pull request as draft January 27, 2024 02:12
@ptomato ptomato mentioned this pull request Jan 31, 2024
91 tasks
polyfill/lib/calendar.mjs Outdated Show resolved Hide resolved
polyfill/lib/calendar.mjs Outdated Show resolved Hide resolved
polyfill/lib/calendar.mjs Outdated Show resolved Hide resolved
polyfill/lib/calendar.mjs Outdated Show resolved Hide resolved
@ptomato
Copy link
Collaborator

ptomato commented Feb 21, 2024

This normative change reached consensus in the 2023-02 TC39 plenary meeting. I've updated this PR to include the test262 tests that I've just merged.

@ptomato ptomato marked this pull request as ready for review February 21, 2024 18:47
@ptomato ptomato merged commit 6ff7f56 into tc39:main Feb 21, 2024
9 checks passed
@fabon-f fabon-f mentioned this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

weekOfYear / yearOfWeek is not clearly specified for non-ISO calendars
3 participants