]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix #3724, change correct files, fix tests
authorIskren Chernev <iskren.chernev@gmail.com>
Sun, 6 Aug 2017 23:08:32 +0000 (02:08 +0300)
committerIskren Chernev <iskren.chernev@gmail.com>
Sun, 6 Aug 2017 23:08:32 +0000 (02:08 +0300)
locale/ru.js
src/locale/ru.js
src/test/locale/ru.js

index 023dee72013faf175ad956d97239b052d04db04b..b45731e36884a370113868f203356c516112f1fb 100644 (file)
@@ -174,7 +174,7 @@ var ru = moment.defineLocale('ru', {
     },
     week : {
         dow : 1, // Monday is the first day of the week.
-        doy : 4  // The week that contains Jan 4st is the first week of the year.
+        doy : 7  // The week that contains Jan 1st is the first week of the year.
     }
 });
 
index 633208a022940b03a086b4322ea2c3951c3a3f2f..5b92fb0f7c0bd78d49adaedf7b4cf09281d5147b 100644 (file)
@@ -168,6 +168,6 @@ export default moment.defineLocale('ru', {
     },
     week : {
         dow : 1, // Monday is the first day of the week.
-        doy : 7  // The week that contains Jan 1st is the first week of the year.
+        doy : 4  // The week that contains Jan 4th is the first week of the year.
     }
 });
index 1441679610741d547412755d0282ab660232269b..b7a13f691132f986922630eaa33ad8ea15d73807 100644 (file)
@@ -43,7 +43,7 @@ test('format', function (assert) {
             ['D Do DD',                            '14 14-го 14'],
             ['d do dddd ddd dd',                   '0 0-й воскресенье вс вс'],
             ['DDD DDDo DDDD',                      '45 45-й 045'],
-            ['w wo ww',                            '7 7-я 07'],
+            ['w wo ww',                            '6 6-я 06'],
             ['h hh',                               '3 03'],
             ['H HH',                               '15 15'],
             ['m mm',                               '25 25'],
@@ -345,11 +345,11 @@ test('calendar all else', function (assert) {
     assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 2 weeks');
 });
 
-test('weeks year starting sunday formatted', function (assert) {
-    assert.equal(moment([2011, 11, 26]).format('w ww wo'), '1 01 1-я', 'Dec 26 2011 should be week 1');
-    assert.equal(moment([2012,  0,  1]).format('w ww wo'), '1 01 1-я', 'Jan  1 2012 should be week 1');
-    assert.equal(moment([2012,  0,  2]).format('w ww wo'), '2 02 2-я', 'Jan  2 2012 should be week 2');
-    assert.equal(moment([2012,  0,  8]).format('w ww wo'), '2 02 2-я', 'Jan  8 2012 should be week 2');
-    assert.equal(moment([2012,  0,  9]).format('w ww wo'), '3 03 3-я', 'Jan  9 2012 should be week 3');
+test('weeks year starting monday formatted', function (assert) {
+    assert.equal(moment([2011, 11, 26]).format('w ww wo'), '52 52 52-я', 'Dec 26 2011 should be week 52');
+    assert.equal(moment([2012,  0,  1]).format('w ww wo'), '52 52 52-я', 'Jan  1 2012 should be week 52');
+    assert.equal(moment([2012,  0,  2]).format('w ww wo'), '1 01 1-я', 'Jan  2 2012 should be week 1');
+    assert.equal(moment([2012,  0,  8]).format('w ww wo'), '1 01 1-я', 'Jan  8 2012 should be week 1');
+    assert.equal(moment([2012,  0,  9]).format('w ww wo'), '2 02 2-я', 'Jan  9 2012 should be week 2');
 });