+3
-1
@@ -5,3 +5,5 @@ /** | ||
| module.exports = function (string) { | ||
| if (match = string.match(/^(\d{4})(-(\d{2})(-(\d{2})(T(\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|((\+|-)(\d{2}):(\d{2}))))?)?)?$/)) { | ||
| if (typeof string.getTime === "function") | ||
| return string; | ||
| else if (match = string.match(/^(\d{4})(-(\d{2})(-(\d{2})(T(\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|((\+|-)(\d{2}):(\d{2}))))?)?)?$/)) { | ||
| var date = new Date(); | ||
@@ -8,0 +10,0 @@ date.setUTCFullYear(Number(match[1])); |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "description": "ISO 8061 date/time parser", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
2869
2.32%29
7.41%