]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[locale] sr-cyrl: Improve L* formats (#4742)
authorStefan Crnjaković <stefan@hotmail.rs>
Tue, 15 Sep 2020 21:53:31 +0000 (23:53 +0200)
committerGitHub <noreply@github.com>
Tue, 15 Sep 2020 21:53:31 +0000 (14:53 -0700)
src/locale/sr-cyrl.js
src/locale/sr.js
src/test/locale/sr-cyrl.js
src/test/locale/sr.js

index 052f9603626c1aa394c24522db4122e182136767..5f695972ae7df27223a34fe455436f7e22838d76 100644 (file)
@@ -1,6 +1,7 @@
 //! moment.js locale configuration
 //! locale : Serbian Cyrillic [sr-cyrl]
 //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
 
 import moment from '../moment';
 
@@ -52,10 +53,10 @@ export default moment.defineLocale('sr-cyrl', {
     longDateFormat: {
         LT: 'H:mm',
         LTS: 'H:mm:ss',
-        L: 'DD.MM.YYYY',
-        LL: 'D. MMMM YYYY',
-        LLL: 'D. MMMM YYYY H:mm',
-        LLLL: 'dddd, D. MMMM YYYY H:mm',
+        L: 'D. M. YYYY.',
+        LL: 'D. MMMM YYYY.',
+        LLL: 'D. MMMM YYYY. H:mm',
+        LLLL: 'dddd, D. MMMM YYYY. H:mm',
     },
     calendar: {
         sameDay: '[данас у] LT',
@@ -110,6 +111,6 @@ export default moment.defineLocale('sr-cyrl', {
     ordinal: '%d.',
     week: {
         dow: 1, // Monday is the first day of the week.
-        doy: 7, // The week that contains Jan 7th is the first week of the year.
+        doy: 7, // The week that contains Jan 1st is the first week of the year.
     },
 });
index 08f6adbe01a6ce0e8bb054cc8d34a2f380b23527..502b54d8d676ee31db06aa0cb425aced434b9ca0 100644 (file)
@@ -1,6 +1,7 @@
 //! moment.js locale configuration
 //! locale : Serbian [sr]
 //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
 
 import moment from '../moment';
 
@@ -54,10 +55,10 @@ export default moment.defineLocale('sr', {
     longDateFormat: {
         LT: 'H:mm',
         LTS: 'H:mm:ss',
-        L: 'DD.MM.YYYY',
-        LL: 'D. MMMM YYYY',
-        LLL: 'D. MMMM YYYY H:mm',
-        LLLL: 'dddd, D. MMMM YYYY H:mm',
+        L: 'D. M. YYYY.',
+        LL: 'D. MMMM YYYY.',
+        LLL: 'D. MMMM YYYY. H:mm',
+        LLLL: 'dddd, D. MMMM YYYY. H:mm',
     },
     calendar: {
         sameDay: '[danas u] LT',
index 6d95f4005b88075d507315e53b724c991b58cc18..f21e8886a19348aca43aa7bd123746d3491d07d8 100644 (file)
@@ -65,14 +65,14 @@ test('format', function (assert) {
             ['a A', 'pm PM'],
             ['[the] DDDo [day of the year]', 'the 45. day of the year'],
             ['LTS', '15:25:50'],
-            ['L', '14.02.2010'],
-            ['LL', '14. фебруар 2010'],
-            ['LLL', '14. фебруар 2010 15:25'],
-            ['LLLL', 'недеља, 14. фебруар 2010 15:25'],
-            ['l', '14.2.2010'],
-            ['ll', '14. феб. 2010'],
-            ['lll', '14. феб. 2010 15:25'],
-            ['llll', 'нед., 14. феб. 2010 15:25'],
+            ['L', '14. 2. 2010.'],
+            ['LL', '14. фебруар 2010.'],
+            ['LLL', '14. фебруар 2010. 15:25'],
+            ['LLLL', 'недеља, 14. фебруар 2010. 15:25'],
+            ['l', '14. 2. 2010.'],
+            ['ll', '14. феб. 2010.'],
+            ['lll', '14. феб. 2010. 15:25'],
+            ['llll', 'нед., 14. феб. 2010. 15:25'],
         ],
         b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
         i;
index 43503b358deac76978290c7c7626e9d178c5cd70..0d4f2e490aeb2a36a96db82305d965aa7027c9d5 100644 (file)
@@ -65,14 +65,14 @@ test('format', function (assert) {
             ['a A', 'pm PM'],
             ['[the] DDDo [day of the year]', 'the 45. day of the year'],
             ['LTS', '15:25:50'],
-            ['L', '14.02.2010'],
-            ['LL', '14. februar 2010'],
-            ['LLL', '14. februar 2010 15:25'],
-            ['LLLL', 'nedelja, 14. februar 2010 15:25'],
-            ['l', '14.2.2010'],
-            ['ll', '14. feb. 2010'],
-            ['lll', '14. feb. 2010 15:25'],
-            ['llll', 'ned., 14. feb. 2010 15:25'],
+            ['L', '14. 2. 2010.'],
+            ['LL', '14. februar 2010.'],
+            ['LLL', '14. februar 2010. 15:25'],
+            ['LLLL', 'nedelja, 14. februar 2010. 15:25'],
+            ['l', '14. 2. 2010.'],
+            ['ll', '14. feb. 2010.'],
+            ['lll', '14. feb. 2010. 15:25'],
+            ['llll', 'ned., 14. feb. 2010. 15:25'],
         ],
         b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
         i;