We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85a9943 commit 96cb9c5Copy full SHA for 96cb9c5
1 file changed
src/relative-time-element.ts
@@ -35,7 +35,7 @@ function getUnitFactor(el: RelativeTimeElement): number {
35
// Determine whether the user has a 12 (vs. 24) hour cycle preference. This relies on the hour formatting in
36
// a 12 hour preference being formatted like "1 AM" including a space, while with a 24 hour preference, the
37
// same is formatted as "01" without a space. In the future `Intl.Locale.prototype.getHourCycles()` could be
38
-// used but in my testing it incorrectly returned a 12 hour preference with MacOS set to 24 hour format.
+// 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)))
41
}
0 commit comments