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

New option "firstWeekOfYearMinDays" for regional week numbering rules support #825

Closed
wants to merge 1 commit into from

Conversation

josundt
Copy link

@josundt josundt commented Dec 17, 2018

Added new option firstWeekOfYearMinDays to support regional variations in week numbering rules. The new option makes it possible to support world-wide rule variations - when not using moment.

The change extends Pikaday's week number support which is currently limited to the ISO 8601 week numbering rule (week 1 = the first week with 4 days - considering Monday as the first day of the week).
https://en.wikipedia.org/wiki/ISO_week_date

The new added option is not mandatory and has a default value of 4, which means Pikadays current behavior is not altered when the option is not specified, it will default to the ISO 8601 rule.

(In the project I am currently working on, I already have the firstWeekOfYearMinDays rule available since cldr-data is loaded for the current user's region/culture (https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json).
The only small shortcoming I faced with respect to week numbers in Pikaday was to have the option that I implemented in this PR.

@josundt josundt changed the title New option "firstWeekOfYearMinDays" for culture relative week numbers New option "firstWeekOfYearMinDays" for regional week numbering rules support Dec 18, 2018
@rikkert
Copy link
Member

rikkert commented Oct 22, 2020

merged thanks

@rikkert rikkert closed this Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants