]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
sometimes US and DE week numbers differ
authorAlex Morega <alex@grep.ro>
Thu, 4 Jul 2013 18:08:29 +0000 (20:08 +0200)
committerAlex Morega <alex@grep.ro>
Thu, 4 Jul 2013 18:19:47 +0000 (20:19 +0200)
babel/tests/dates.py

index eff7a956c396d4c921cfe272bfca49bafce7050a..29be1211107b4015cc18e8d580e067d4a583cbb3 100644 (file)
@@ -60,12 +60,19 @@ class DateTimeFormatTestCase(unittest.TestCase):
         self.assertEqual('2005', fmt['YYYY'])
 
     def test_week_of_year_last(self):
-        d = date(2005, 12, 26)
+        d = date(2006, 12, 26)
         fmt = dates.DateTimeFormat(d, locale='de_DE')
         self.assertEqual('52', fmt['w'])
         fmt = dates.DateTimeFormat(d, locale='en_US')
         self.assertEqual('52', fmt['w'])
 
+    def test_week_of_year_last_us_extra_week(self):
+        d = date(2005, 12, 26)
+        fmt = dates.DateTimeFormat(d, locale='de_DE')
+        self.assertEqual('52', fmt['w'])
+        fmt = dates.DateTimeFormat(d, locale='en_US')
+        self.assertEqual('53', fmt['w'])
+
     def test_week_of_month_first(self):
         d = date(2006, 1, 8)
         fmt = dates.DateTimeFormat(d, locale='de_DE')