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

wrong assumption about ISO8601 being used for week numbering

Open johnyb opened this issue 9 years ago • 2 comments

Expected behaviour

Using en locale, week numbering should be done according to calendars in the U.S. For year 2016, January 1st should be in week one.

Actual behaviour

January 1st is in week 53 of 2015, due to the assumption that week 1 contains the first Thursday of the year. This does not hold true for en locale.

Datepicker version used

1.6.1.

Example code

https://eternicode.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&maxViewMode=4&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&calendarWeeks=on&keyboardNavigation=on&forceParse=on#sandbox

And view January 2016. Compare this to some other source, like http://www.timeanddate.com/date/weeknumber.html#!week=01&year=2016

johnyb avatar Jul 08 '16 12:07 johnyb

Since this issue has so far been neglected, I want to draw attention to it again by adding that this results in wrong week numbers for the entire year 2016 (and other years as well) for countries in the en locale like the US that do not follow ISO-8601.

Also see: https://en.wikipedia.org/wiki/Week#Week_numbering

bennyschaefer avatar May 19 '17 10:05 bennyschaefer

+1

It should be possible to change ISO or not ISO rules dependent on locale.

ghost avatar May 16 '22 03:05 ghost