@shopify/dates
Advanced tools
Comparing version 0.2.13-fixmemoryleak-beta.1 to 0.2.13
@@ -9,2 +9,6 @@ # Changelog | ||
## [0.2.13] - 2020-02-07 | ||
- Fixes the memory leak that was introduced in v0.1.27 when server-side rendering ([#1277](https://github.com/Shopify/quilt/pull/1277)) | ||
## [0.2.12] - 2020-02-07 | ||
@@ -11,0 +15,0 @@ |
@@ -14,5 +14,14 @@ "use strict"; | ||
}; | ||
var browserFeatureDetectionDate = Intl.DateTimeFormat('en', { | ||
hour: 'numeric', | ||
}); | ||
var resolvedOptions = typeof browserFeatureDetectionDate.resolvedOptions === 'undefined' | ||
? undefined | ||
: browserFeatureDetectionDate.resolvedOptions(); | ||
function formatDate(date, locales, options) { | ||
if (options === void 0) { options = {}; } | ||
if (options.hour12 != null && options.hourCycle != null) { | ||
var hourCycleRequired = resolvedOptions != null && | ||
options.hour12 != null && | ||
resolvedOptions.hourCycle != null; | ||
if (hourCycleRequired) { | ||
options.hour12 = undefined; | ||
@@ -19,0 +28,0 @@ options.hourCycle = 'h23'; |
{ | ||
"name": "@shopify/dates", | ||
"version": "0.2.13-fixmemoryleak-beta.1", | ||
"version": "0.2.13", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Lightweight date operations library.", |
Sorry, the diff of this file is not supported yet
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
45571
664