@shopify/dates
Advanced tools
Comparing version 0.2.11 to 0.2.12
@@ -9,4 +9,8 @@ # Changelog | ||
## [Unreleased] | ||
## [0.2.12] - 2020-02-07 | ||
- ⚠️ A bug fix because Chrome 80's API change to Intl.DateTimeFormat ([#1266](https://github.com/Shopify/quilt/pull/1266)) | ||
## [0.2.11] - 2020-01-31 | ||
- Specify package has no `sideEffects` ([#1233](https://github.com/Shopify/quilt/pull/1233)) | ||
@@ -13,0 +17,0 @@ |
@@ -1,2 +0,6 @@ | ||
export declare function formatDate(date: Date, locales: string | string[], options?: Intl.DateTimeFormatOptions): string; | ||
interface FormatDateOptions extends Intl.DateTimeFormatOptions { | ||
hourCycle?: string; | ||
} | ||
export declare function formatDate(date: Date, locales: string | string[], options?: FormatDateOptions): string; | ||
export {}; | ||
//# sourceMappingURL=formatDate.d.ts.map |
@@ -11,2 +11,6 @@ "use strict"; | ||
var adjustedDate = new Date(date.valueOf() - 12 * 60 * 60 * 1000); | ||
if (options.hour12 != null) { | ||
options.hour12 = undefined; | ||
options.hourCycle = 'h23'; | ||
} | ||
return memoizedGetDateTimeFormat(locales, tslib_1.__assign(tslib_1.__assign({}, options), { timeZone: 'UTC' })).format(adjustedDate); | ||
@@ -13,0 +17,0 @@ } |
{ | ||
"name": "@shopify/dates", | ||
"version": "0.2.11", | ||
"version": "0.2.12", | ||
"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
45034
650