Add format of ISO week-numbering year
See original GitHub issueπ feature request
Relevant Package
This feature request is for @angular/commonDescription
formatDate(new Date(2018, 11, 31), 'yyyy-ww', 'en-US')
// 2018-01
Week is right but year is wrong.
Describe the solution youβd like
Add an ISO week-numbering year like rrrr
.
formatDate(new Date(2018, 11, 31), 'rrrr-ww', 'en-US')
// 2019-01
Here is the reference of date-fns.
Describe alternatives youβve considered
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
ISO week date - Wikipedia
An ISO week-numbering year (also called ISO year informally) has 52 or 53 full weeks. That is 364 or 371 days instead of...
Read more >ISO Date Representatation and Week Numbering
The week numbering algorithm looks strange. It means that Week 1 will not start on 1st January. ... or 53 may extend into...
Read more >ISO Week Number Calculation - Claris - FileMaker Pro
This function was designed to identify the fiscal year for calendar dates, and meet The International Organization for Standardization (ISO) week-numbering ...
Read more >ISO-8601 Week-Based Calendar - Tableau Help
ISO -8601 calendars divide dates into Years, Quarters, Weeks, and Week Days. ... For example, adding one month to an ISO-8601 date will...
Read more >How Do Week Numbers Work? - Time and Date
The weeks of the year in a Gregorian calendar are numbered from week 1 to week 52 or 53, depending on several varying...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@prashanttholia - sorry for not replying sooner. We discussed this and felt it would be better to go with the
Y
formatting character rather thanr
. I know that you are keen to help out in this but since we are really close to final release of 11.0.0, @AndrewKushnir went ahead and created a PR to fix this up in https://github.com/angular/angular/pull/39495. Thank you for the original PR.(We need to work out what to do about ISO alignment for weeks etc too.)
(Also thanks to @cexbrayat for pinging me about this outstanding question!)
@prashant-tholia - great! Please make sure you have read https://github.com/angular/angular/blob/master/CONTRIBUTING.md. The PR will need to include unit tests and documentation before it can be merged.
Let me know if you need help getting started.