Excaping the - char in the regex.

This commit is contained in:
Randy Merrill 2011-01-21 09:32:18 -08:00
parent af78c1cca8
commit 627de675dc

View file

@ -87,7 +87,7 @@
s = s.replace(/\.\d\d\d+/,""); // remove milliseconds
s = s.replace(/-/,"/").replace(/-/,"/");
s = s.replace(/T/," ").replace(/Z/," UTC");
s = s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
return new Date(s);
},
datetime: function(elem) {