]> git.ipfire.org Git - thirdparty/babel.git/commit
fixes #619 wrong weeknumber for 31.12.2018 (#621)
authorBT-sschmid <39914536+BT-sschmid@users.noreply.github.com>
Fri, 1 Mar 2019 11:00:44 +0000 (12:00 +0100)
committerAarni Koskela <akx@iki.fi>
Fri, 1 Mar 2019 11:00:44 +0000 (13:00 +0200)
commitea5bc4988bf7c3be84d296eb874aa11ed86c907d
treebe4fea1c2b23e9ead65bce3689ae8028f7bd0d6b
parent60af039d9b282b46e37f6f8556005c339f5c24a2
fixes #619 wrong weeknumber for 31.12.2018 (#621)

The weeknumber was calculated to 53, but by definition the value must compute to 1.

the fix will compute the weeknumber by using date.isocalendar if locale.first_week_day == 0.

Also the computation of the year format 'YYYY' is replaced by isocalendar.
babel/dates.py
tests/test_dates.py