Comparing version 1.2.0 to 1.2.1
@@ -7,2 +7,6 @@ # Changelog | ||
## v1.2.1 (2015-10-14) | ||
* #8 odd date parsing behaviour | ||
## v1.2.0 (2015-10-13) | ||
@@ -9,0 +13,0 @@ |
@@ -267,3 +267,8 @@ /* | ||
*/ | ||
return (new Date(+str || str)); | ||
var numeric = +str; | ||
if (!isNaN(numeric)) { | ||
return (new Date(numeric)); | ||
} else { | ||
return (new Date(str)); | ||
} | ||
} | ||
@@ -270,0 +275,0 @@ |
{ | ||
"name": "jsprim", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "utilities for primitive JavaScript types", | ||
@@ -5,0 +5,0 @@ "main": "./lib/jsprim.js", |
@@ -271,2 +271,9 @@ /* | ||
mod_assert.equal('1970-01-01T00:00:02.000Z', | ||
jsprim.iso8601(jsprim.parseDateTime('2000'))); | ||
mod_assert.equal('1970-01-01T00:00:00.001Z', | ||
jsprim.iso8601(jsprim.parseDateTime('1'))); | ||
mod_assert.equal('1970-01-01T00:00:00.000Z', | ||
jsprim.iso8601(jsprim.parseDateTime('0'))); | ||
console.log('basic tests okay'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66306
1562