Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd format of ISO week-numbering year #38739
Comments
Normally I am cautious about adding new functionality but I think that this case could be an exception. Since we are already doing the calculations for the week numbering, it is probably not too much more to compute the "week year". This might be a good first time PR for someone... |
Hi, I'd like to work on this issue. |
@prashant-tholia - great! Please make sure you have read https://github.com/angular/angular/blob/master/CONTRIBUTING.md. Let me know if you need help getting started. |
Thanks @petebacondarwin! I'll make sure to fulfill all mentioned guidelines and requirements. |
Hello, can I also be work on this issue with @prashant-tholia since this is a good first issue and I am an open source beginner. |
Add support to format iso week-numbering year with 'r' in dateFormat string template. PR angular#38739
Add support to format iso week-numbering year with 'r' in dateFormat string template. PR angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:angular#38739
@prashanttholia, Not to be pedantic or anything, but I think the 'r' placeholder is a mistake here. CLDR/Unicode defines this in http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table as
The ISO week year is actually 'Y', 'YY', 'YYY', 'YYYY', etc.:
|
@rubenprins, I apologize for the late response. I think that formats should be consistent with or as close as possible to the standard. I agree that 'Y' would be a more appropriate choice to represent week numbering year. @petebacondarwin, please let us know what you think and whether it needs to be updated? |
Relevant Package
This feature request is for @angular/commonDescription
Week is right but year is wrong.
Describe the solution you'd like
Add an ISO week-numbering year like
rrrr
.Here is the reference of date-fns.
Describe alternatives you've considered