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

fix(common): The date pipe should return ISO format for week and week… #53879

Closed
wants to merge 1 commit into from

Conversation

JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Jan 11, 2024

… year as intended in the unit tests.

This commit makes adds the mention to the doc that it is intended to return a ISO week/week-year (as opposed to a locale based wee/week-year).

ISO 8601 defines

  • Monday as the first day of the week.
  • week 01 is the week with the first Thursday

Therefore:
Sunday Dec 31st 2023 is the last day of the last week of the year : W52 2023.

Fixes: #53813

@JeanMeche JeanMeche marked this pull request as ready for review January 11, 2024 15:23
packages/common/src/i18n/format_date.ts Outdated Show resolved Hide resolved
packages/common/src/i18n/format_date.ts Outdated Show resolved Hide resolved
@alxhub alxhub added action: global presubmit The PR is in need of a google3 global presubmit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Jan 12, 2024
@alxhub
Copy link
Member

alxhub commented Jan 12, 2024

Caretaker: this should get a TGP :)

@dylhunn dylhunn added the area: common Issues related to APIs in the @angular/common package label Jan 17, 2024
@ngbot ngbot bot added this to the Backlog milestone Jan 17, 2024
@jessicajaniuk jessicajaniuk requested review from AndrewKushnir and removed request for AndrewKushnir January 26, 2024 16:23
@jessicajaniuk jessicajaniuk added the target: patch This PR is targeted for the next patch release label Jan 26, 2024
@AndrewKushnir
Copy link
Contributor

Caretaker note: this PR still requires TGP, it's not yet ready for merge.

@jessicajaniuk
Copy link
Contributor

TGP

@jessicajaniuk
Copy link
Contributor

It looks like there's a few legitimate failing targets. Adding state: blocked for now. Ping me and we can work through them.

@jessicajaniuk jessicajaniuk added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed state: blocked labels Jan 31, 2024
…-year as intended in the unit test.

ISO 8601 defines
* Monday as the first day of the week.
* week 01 is the week with the first Thursday

Therefore:
Sunday Dec 31st 2023 is the last day of the last week of the year : W52 2023.
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: global presubmit The PR is in need of a google3 global presubmit labels Jan 31, 2024
@jessicajaniuk jessicajaniuk removed the request for review from AndrewKushnir January 31, 2024 16:40
jessicajaniuk pushed a commit that referenced this pull request Jan 31, 2024
…-year as intended in the unit test. (#53879)

ISO 8601 defines
* Monday as the first day of the week.
* week 01 is the week with the first Thursday

Therefore:
Sunday Dec 31st 2023 is the last day of the last week of the year : W52 2023.

PR Close #53879
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit 122213d.

@JeanMeche JeanMeche deleted the fix/week-iso branch February 11, 2024 21:08
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ISO week-numbering year incorrect for some years
6 participants