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
moment.HTML5_FMT.WEEK should be 'GGGG-[W]WW' #4698
Labels
Comments
ashsearle
added a commit
to ashsearle/moment
that referenced
this issue
Jul 13, 2018
@jacquev6 Well spotted! Thanks for logging the issue :-) |
ashsearle
added a commit
to ashsearle/moment
that referenced
this issue
Oct 31, 2018
ashsearle
added a commit
to ashsearle/moment
that referenced
this issue
Oct 31, 2018
Documentation is not up to date : https://momentjs.com/docs/#/parsing/string-format/ It indicate YYYY instead of GGGG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current value of HTML5_FMT.WEEK is
"YYYY-[W]WW"
but this format is supposed to parse and format ISO weeks. It should be"GGGG-[W]WW"
.When parsing,
YYYY
is equivalent toGGGG
, but when formatting, it's not : for a year like 2004 when the first ISO week starts in the previous year, formatting with "YYYY" returns "2003":The text was updated successfully, but these errors were encountered: