We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2db2686 commit a2d1259Copy full SHA for a2d1259
src/relative-time-element.ts
@@ -37,7 +37,7 @@ function getUnitFactor(el: RelativeTimeElement): number {
37
// same is formatted as "01" without a space. In the future `Intl.Locale.prototype.getHourCycles()` could be
38
// used but it is not as well-supported as this method.
39
function isBrowser12hCycle() {
40
- return Boolean(/\s/.exec(new Intl.DateTimeFormat([], {hour: 'numeric'}).format(0)))
+ return Boolean(/\s/.exec(new Intl.DateTimeFormat([], {hour: 'numeric'}).format(new Date(0))))
41
}
42
43
function isHour12(hourCycle: Intl.DateTimeFormatOptions['hourCycle']) {
0 commit comments