]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Switching to formatting token regex to save filesize.
authorTim Wood <washwithcare@gmail.com>
Wed, 11 Apr 2012 03:21:40 +0000 (20:21 -0700)
committerTim Wood <washwithcare@gmail.com>
Wed, 11 Apr 2012 03:21:40 +0000 (20:21 -0700)
moment.js

index cd489fc7a7a8e2529ea66a67dbeb5ac7b758b9fd..787c4074bc49db7638a938d704ecc0d8a423f555 100644 (file)
--- a/moment.js
+++ b/moment.js
@@ -30,7 +30,6 @@
         timezoneRegex = /\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,
 
         // parsing tokens
-        parsingTokens = /(\\)?(MM?M?M?|dd?d?d|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|ZZ?|T)/g,
         parseMultipleFormatChunker = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,
 
         // parsing token regexes
                 tzh : 0, // timezone hour offset
                 tzm : 0  // timezone minute offset
             },
-            tokens = format.match(parsingTokens),
+            tokens = format.match(formattingTokens),
             i, parsedInput;
 
         for (i = 0; i < tokens.length; i++) {