From: Oliver, Jonathan Date: Thu, 29 Dec 2011 12:16:01 +0000 (-0700) Subject: Removed unnecessary information from regex. X-Git-Tag: 1.4.0~31^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F119%2Fhead;p=thirdparty%2Fmoment.git Removed unnecessary information from regex. --- diff --git a/moment.js b/moment.js index fa322a71e..9b3591f8c 100644 --- a/moment.js +++ b/moment.js @@ -13,7 +13,7 @@ hasModule = (typeof module !== 'undefined'), paramsToParse = 'months|monthsShort|monthsParse|weekdays|weekdaysShort|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split('|'), i, - jsonRegex = /\/?Date\((\d+)((?:\-|\+)\d+)?\)\/?/i, + jsonRegex = /^\/?Date\((\d+)/i, charactersToReplace = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LT|LL?L?L?)/g, nonuppercaseLetters = /[^A-Z]/g, timezoneRegex = /\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,