From: Abdel Said Date: Mon, 26 Nov 2012 13:41:18 +0000 (-0500) Subject: Changed parseTokenWord as it produced some tests to fail. X-Git-Tag: 2.0.0~33^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5eef89bca62df44a9115db4345105f918d4c2270;p=thirdparty%2Fmoment.git Changed parseTokenWord as it produced some tests to fail. --- diff --git a/moment.js b/moment.js index e0148161c..af8b7ec1d 100644 --- a/moment.js +++ b/moment.js @@ -36,7 +36,7 @@ parseTokenThreeDigits = /\d{3}/, // 000 - 999 parseTokenFourDigits = /\d{1,4}/, // 0 - 9999 parseTokenSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999 - parseTokenWord = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\s*?[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, // any word (or two) characters or numbers. Added \s*?... to match arabic two word month. + parseTokenWord = /[0-9a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i, // any word (or two) characters or numbers including two word month in arabic. parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/i, // +00:00 -00:00 +0000 -0000 or Z parseTokenT = /T/i, // T (ISO seperator)