true-time-format
Advanced tools
Comparing version 1.0.2 to 1.0.3
14
index.js
@@ -124,3 +124,3 @@ let | ||
let | ||
Y = this.year, | ||
Y = xx(this.year, 4), | ||
M = xx(this.month), | ||
@@ -153,4 +153,10 @@ D = xx(this.day), | ||
function xx(x) { | ||
return (x < 10 && '0' || '') + x.toString(); | ||
function xx(x, mid) { | ||
return x.toLocaleString( | ||
'en', | ||
{ | ||
minimumIntegerDigits: mid || 2, | ||
useGrouping: false | ||
} | ||
); | ||
} | ||
@@ -244,3 +250,3 @@ | ||
if (m[i + 1] === '-') t.offset = -t.offset; | ||
if(invalidOffset(t.offset)) return ''; | ||
if (invalidOffset(t.offset)) return ''; | ||
timeString = trim(timeString, m.index, m[0].length); | ||
@@ -247,0 +253,0 @@ } |
{ | ||
"name": "true-time-format", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"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
16788
480