]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
better fix for month parser issue 1020/head
authorIsaac Cambron <icambron@gmail.com>
Thu, 22 Aug 2013 23:51:59 +0000 (19:51 -0400)
committerIsaac Cambron <icambron@gmail.com>
Thu, 22 Aug 2013 23:51:59 +0000 (19:51 -0400)
moment.js

index 03d66a4e02e82602d7467ffd5ca388f0e6ed97ea..e44164f118ce532ad6c9a20e2c66e28a990ad232 100644 (file)
--- a/moment.js
+++ b/moment.js
             for (i = 0; i < 12; i++) {
                 // make the regex if we don't have it already
                 if (!this._monthsParse[i]) {
-                    mom = moment([2000, i, 2]);
+                    mom = moment.utc([2000, i]);
                     regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
                     this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
                 }