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

ISO week year (%g and %G) parsing and formatting is inconsistent. #93

Open
mbostock opened this issue Feb 2, 2021 · 0 comments
Open

Comments

@mbostock
Copy link
Member

mbostock commented Feb 2, 2021

In #52, %g and %G were implemented as aliases of %y and %Y. This leads to inconsistencies with formatting. For example, 21-Jan parsed with %g-%b is 2021-01-01. This same date formatted with %g-%b is 20-Jan because the ISO week year 2021 doesn’t start until 2021-01-04. Therefore it would be more appropriate for the parser to have returned 2021-01-04. But that requires some fancier parsing logic…

@mbostock mbostock changed the title ISO week year parsing (%g and %G) is not consistent with formatting. ISO week year (%g and %G) parsing and formatting is inconsistent. Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant