Skip to content

Address date-fns warning for year formatting #3107

@sergei-maertens

Description

@sergei-maertens

In

{format(visibleMonth, 'LLLL y', { locale })}

we deliberately use the y formatter rather than Y (see b912501), but date-fns emits a warning about that linking to https://github.com/date-fns/date-fns/blob/main/docs/unicodeTokens.md#popular-mistakes

The solution here seems to be to add the useAdditionalWeekYearTokens: true, option that signals we do in fact mean y rather than Y.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions