]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix issue #3805
authorTim Fish <tim@timfishy.co.uk>
Sat, 4 Mar 2017 15:06:22 +0000 (16:06 +0100)
committerIskren Chernev <iskren.chernev@gmail.com>
Sat, 11 Mar 2017 23:17:45 +0000 (01:17 +0200)
src/locale/es-do.js
src/locale/es.js
src/locale/fy.js
src/locale/nl-be.js
src/locale/nl.js

index 21a44ab89a1c45080fce3bdcf593b6be6918b6f7..ef2e1bd1993b7239f483de6143a3bb83a598d760 100644 (file)
@@ -9,7 +9,9 @@ var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic
 export default moment.defineLocale('es-do', {
     months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
     monthsShort : function (m, format) {
-        if (/-MMM-/.test(format)) {
+        if(!m){
+            return monthsShortDot;
+        } else if (/-MMM-/.test(format)) {
             return monthsShort[m.month()];
         } else {
             return monthsShortDot[m.month()];
index cc971615a96ca1179552a36e51a5c16382d49497..7bb814c741e8b9f338236639c9dd18ee5665b4ff 100644 (file)
@@ -10,7 +10,9 @@ var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic
 export default moment.defineLocale('es', {
     months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
     monthsShort : function (m, format) {
-        if (/-MMM-/.test(format)) {
+        if(!m){
+            return monthsShortDot;
+        } else if (/-MMM-/.test(format)) {
             return monthsShort[m.month()];
         } else {
             return monthsShortDot[m.month()];
index 5861a772657ba995cea0ea1164127c6bb3960540..b3008e8dce4a82902bc1fcb1ab2b43679b66267e 100644 (file)
@@ -10,7 +10,9 @@ var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov.
 export default moment.defineLocale('fy', {
     months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
     monthsShort : function (m, format) {
-        if (/-MMM-/.test(format)) {
+        if(!m){
+            return monthsShortWithDots;
+        } else if (/-MMM-/.test(format)) {
             return monthsShortWithoutDots[m.month()];
         } else {
             return monthsShortWithDots[m.month()];
index 159eee3871fa77196d799c418e68b4ee8387d081..a2bfbfa4e7f4ac263646a1055ae1b3e7f4fcf4c3 100644 (file)
@@ -14,7 +14,9 @@ var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|sep
 export default moment.defineLocale('nl-be', {
     months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
     monthsShort : function (m, format) {
-        if (/-MMM-/.test(format)) {
+        if(!m){
+            return monthsShortWithDots;
+        } else if (/-MMM-/.test(format)) {
             return monthsShortWithoutDots[m.month()];
         } else {
             return monthsShortWithDots[m.month()];
index 0988cfe6a9ec9d749fe270376f0ee27b6e6bed8e..58922981cd820b30420263f0b336dbc7eda124ad 100644 (file)
@@ -14,7 +14,9 @@ var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|sep
 export default moment.defineLocale('nl', {
     months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
     monthsShort : function (m, format) {
-        if (/-MMM-/.test(format)) {
+        if(!m){
+            return monthsShortWithDots;
+        } else if (/-MMM-/.test(format)) {
             return monthsShortWithoutDots[m.month()];
         } else {
             return monthsShortWithDots[m.month()];