]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Make colon in ISO timezone format acceptable only when minutes are specified (+01... 1358/head
authorTim Perry <tim.perry@softwire.com>
Tue, 17 Dec 2013 17:47:30 +0000 (17:47 +0000)
committerTim Perry <tim.perry@softwire.com>
Tue, 17 Dec 2013 17:47:30 +0000 (17:47 +0000)
moment.js

index 2e54c853da80598cdfd71650349d2de9bdea9040..4b26de3d0911c803cdd28651e2653f404a2f71cb 100644 (file)
--- a/moment.js
+++ b/moment.js
@@ -62,7 +62,7 @@
 
         // iso 8601 regex
         // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
-        isoRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d:?(?:\d\d)?|\s*Z)?)?$/,
+        isoRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
 
         isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',