Skip to content

Week algorithm should take minDays into account #1787

@zbraniecki

Description

@zbraniecki

Currently, week calculations as presented here: https://html.spec.whatwg.org/multipage/infrastructure.html#weeks assume first week is calculated the same way for all locales.

CLDR and ICU have special data item called minDays and a method called getMinimalDaysInFirstWeek to make the calendar week calculations match the common patterns for a given locale.

Most userland date/time libraies (like, jquery's globalization and calendar) use that and it seems like a bug that W3C spec doesn't.

[0] https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json#L9
[1] http://icu-project.org/apiref/icu4c/classicu_1_1Calendar.html#a8b667a3b107b4269d57fdd58e76f37c1
[2] https://github.com/jquery/globalize/blob/master/src/date/format.js#L123

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