date-fns-tz
Advanced tools
Comparing version 1.3.6 to 1.3.7
@@ -20,3 +20,8 @@ "use strict"; | ||
var formatted = dtf.formatToParts(date); | ||
return formatted[formatted.length - 1].value; | ||
for (var i = formatted.length - 1; i >= 0; --i) { | ||
if (formatted[i].type === 'timeZoneName') { | ||
return formatted[i].value; | ||
} | ||
} | ||
} | ||
@@ -23,0 +28,0 @@ |
@@ -69,3 +69,3 @@ "use strict"; | ||
year: 'numeric', | ||
month: '2-digit', | ||
month: 'numeric', | ||
day: '2-digit', | ||
@@ -81,3 +81,3 @@ hour: '2-digit', | ||
year: 'numeric', | ||
month: '2-digit', | ||
month: 'numeric', | ||
day: '2-digit', | ||
@@ -91,3 +91,3 @@ hour: '2-digit', | ||
year: 'numeric', | ||
month: '2-digit', | ||
month: 'numeric', | ||
day: '2-digit', | ||
@@ -94,0 +94,0 @@ hour: '2-digit', |
@@ -13,3 +13,8 @@ /** | ||
var formatted = dtf.formatToParts(date) | ||
return formatted[formatted.length - 1].value | ||
for (var i = formatted.length - 1; i >= 0; --i) { | ||
if (formatted[i].type === 'timeZoneName') { | ||
return formatted[i].value | ||
} | ||
} | ||
} | ||
@@ -16,0 +21,0 @@ |
@@ -58,3 +58,3 @@ /** | ||
year: 'numeric', | ||
month: '2-digit', | ||
month: 'numeric', | ||
day: '2-digit', | ||
@@ -74,3 +74,3 @@ hour: '2-digit', | ||
year: 'numeric', | ||
month: '2-digit', | ||
month: 'numeric', | ||
day: '2-digit', | ||
@@ -85,3 +85,3 @@ hour: '2-digit', | ||
year: 'numeric', | ||
month: '2-digit', | ||
month: 'numeric', | ||
day: '2-digit', | ||
@@ -88,0 +88,0 @@ hour: '2-digit', |
{ | ||
"name": "date-fns-tz", | ||
"version": "1.3.6", | ||
"version": "1.3.7", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "description": "Time zone support for date-fns v2 with the Intl API", |
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
211560
3466