From 1781e21d4e54515c9533c5adf147f7a8b5e8d774 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20Crnjakovi=C4=87?= Date: Tue, 15 Sep 2020 23:53:31 +0200 Subject: [PATCH] [locale] sr-cyrl: Improve L* formats (#4742) --- src/locale/sr-cyrl.js | 11 ++++++----- src/locale/sr.js | 9 +++++---- src/test/locale/sr-cyrl.js | 16 ++++++++-------- src/test/locale/sr.js | 16 ++++++++-------- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/locale/sr-cyrl.js b/src/locale/sr-cyrl.js index 052f96036..5f695972a 100644 --- a/src/locale/sr-cyrl.js +++ b/src/locale/sr-cyrl.js @@ -1,6 +1,7 @@ //! moment.js locale configuration //! locale : Serbian Cyrillic [sr-cyrl] //! author : Milan Janačković : https://github.com/milan-j +//! author : Stefan Crnjaković : 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. }, }); diff --git a/src/locale/sr.js b/src/locale/sr.js index 08f6adbe0..502b54d8d 100644 --- a/src/locale/sr.js +++ b/src/locale/sr.js @@ -1,6 +1,7 @@ //! moment.js locale configuration //! locale : Serbian [sr] //! author : Milan Janačković : https://github.com/milan-j +//! author : Stefan Crnjaković : 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', diff --git a/src/test/locale/sr-cyrl.js b/src/test/locale/sr-cyrl.js index 6d95f4005..f21e8886a 100644 --- a/src/test/locale/sr-cyrl.js +++ b/src/test/locale/sr-cyrl.js @@ -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; diff --git a/src/test/locale/sr.js b/src/test/locale/sr.js index 43503b358..0d4f2e490 100644 --- a/src/test/locale/sr.js +++ b/src/test/locale/sr.js @@ -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; -- 2.47.2