]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Escape all 24 mixed pieces, not only first 12
authorJacob Middag <jacob@gaddim.nl>
Wed, 15 Jun 2016 07:59:45 +0000 (09:59 +0200)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 15 Jun 2016 09:23:00 +0000 (02:23 -0700)
src/lib/units/month.js

index 651e80df4ed9c7d2f8b55ed7cd7078755bfb0dc8..58f53f339d8a477088a3479129642206e671c666 100644 (file)
@@ -258,6 +258,9 @@ function computeMonthsParse () {
         longPieces[i] = regexEscape(longPieces[i]);
         mixedPieces[i] = regexEscape(mixedPieces[i]);
     }
+    for (; i < 24; i++) {
+        mixedPieces[i] = regexEscape(mixedPieces[i]);
+    }
 
     this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
     this._monthsShortRegex = this._monthsRegex;