]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[locale] (ar-ma) adjust dow, doy to match fr (#5609)
authorKafil <kafil.nasdami@gmail.com>
Sat, 19 Sep 2020 10:34:40 +0000 (11:34 +0100)
committerGitHub <noreply@github.com>
Sat, 19 Sep 2020 10:34:40 +0000 (03:34 -0700)
src/locale/ar-ma.js
src/test/locale/ar-ma.js

index c11fc334f86145011aa52bfb1e9c6e4ae66862e6..6b7011e8ace595f410f491d05afad17e41df53d4 100644 (file)
@@ -49,7 +49,7 @@ export default moment.defineLocale('ar-ma', {
         yy: '%d سنوات',
     },
     week: {
-        dow: 6, // Saturday is the first day of the week.
-        doy: 12, // The week that contains Jan 12th is the first week of the year.
+        dow: 1, // Monday is the first day of the week.
+        doy: 4, // The week that contains Jan 4th is the first week of the year.
     },
 });
index ce00b88178b5fe229c0a53c51b4a39203a1ee905..b119da474bf11a1b715f307aa6a10246e371f82e 100644 (file)
@@ -56,7 +56,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', '8 8 08'],
+            ['w wo ww', '6 6 06'],
             ['h hh', '3 03'],
             ['H HH', '15 15'],
             ['m mm', '25 25'],
@@ -417,11 +417,11 @@ test('calendar all else', function (assert) {
     );
 });
 
-test('weeks year starting sunday formatted', function (assert) {
+test('weeks year starting monday formatted', function (assert) {
     assert.equal(
         moment([2011, 11, 31]).format('w ww wo'),
-        '1 01 1',
-        'Dec 31 2011 should be week 1'
+        '52 52 52',
+        'Dec 31 2011 should be week 52'
     );
     assert.equal(
         moment([2012, 0, 6]).format('w ww wo'),
@@ -430,8 +430,8 @@ test('weeks year starting sunday formatted', function (assert) {
     );
     assert.equal(
         moment([2012, 0, 7]).format('w ww wo'),
-        '2 02 2',
-        'Jan  7 2012 should be week 2'
+        '1 01 1',
+        'Jan  7 2012 should be week 1'
     );
     assert.equal(
         moment([2012, 0, 13]).format('w ww wo'),
@@ -440,7 +440,7 @@ test('weeks year starting sunday formatted', function (assert) {
     );
     assert.equal(
         moment([2012, 0, 14]).format('w ww wo'),
-        '3 03 3',
-        'Jan 14 2012 should be week 3'
+        '2 02 2',
+        'Jan 14 2012 should be week 2'
     );
 });