true-time-format
Advanced tools
Comparing version 1.0.0 to 1.0.1
10
index.js
@@ -186,3 +186,3 @@ let | ||
this.offset = 0; | ||
this.y00 = m ? parseInt(m[0]) * 100 : 0; | ||
this.since = m ? parseInt(m[0]) * 100 : 0; | ||
if (m) layout = layout.slice(m[0].length); | ||
@@ -315,5 +315,5 @@ | ||
let y00 = this.y00; | ||
let since = this.since; | ||
for (let i = 0; i < seq.length; i++) | ||
if (!assign(layout[i], seq[i], t, y00)) | ||
if (!assign(layout[i], seq[i], t, since)) | ||
return null; | ||
@@ -328,3 +328,3 @@ return assert(t); | ||
function assign(k, x, t, y00) { | ||
function assign(k, x, t, since) { | ||
let v; | ||
@@ -340,3 +340,3 @@ if (x[0] <= '9') | ||
case 'Y': | ||
t.year = v + (x.length === 2 ? y00 : 0); | ||
t.year = v + (x.length === 2 ? since : 0); | ||
break; | ||
@@ -343,0 +343,0 @@ case 'M': |
{ | ||
"name": "true-time-format", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "True class to parse, format, and manipulate datetimes.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
14438