Skip to content

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

@mbostock

Description

@mbostock

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…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions