bootstrap-datepicker icon indicating copy to clipboard operation
bootstrap-datepicker copied to clipboard

Calculate calendar weeks using US system for 'en' locale

Open matthias-g opened this issue 8 years ago • 3 comments

This pull request changes the default calendar week numbering to the US system (first calendar week is the week containing Jan 1st = the week containing the first Saturday of the year).

To calculate the calendar weeks according to ISO 8601 set firstCalendarWeekDay to 4 (Thursday). This pull requests does this for all locales setting weekStart to 1.

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Related tickets fixes #1942
License MIT

matthias-g avatar Jun 07 '17 15:06 matthias-g

Thanks a lot for the contribution @matthias-g! I've requested a review from a few of the maintainers and I will try to review the PR soon!

/cc @Azaret @vsn4ik

acrobat avatar Jun 07 '17 18:06 acrobat

Thanks. When reviewing feel free to come up with better names for the variables. I'm not really happy with firstCalendarWeekDay but it was the best I found for the day of the week that must be contained in the first calendar week of the year.

matthias-g avatar Jun 07 '17 21:06 matthias-g

Why is it not merged? Many years passed and still nothing?

ghost avatar May 16 '22 03:05 ghost