-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Edge Version: 145.0.3800.70
OS: Windows
Reproducible in Chrome: No — works correctly in Chrome 145.0.7632.76 on the same machine
Description:
When constructing an Intl.DateTimeFormat instance with individual time component options (hour, minute, second), Edge silently discards those options instead of applying them. The resulting formatter returns an empty string from .format() and an empty array from .formatToParts(). No error or warning is thrown, making this extremely difficult to diagnose.
This is confirmed to be an Edge-specific regression. The identical code works correctly in Chrome on the same machine with the same OS and timezone settings.
The bug is causing production breakage in enterprise web applications that rely on Intl.DateTimeFormat for time-series chart rendering, including ThousandEyes and ScienceLogic, where time axis labels appear as undefined or blank throughout their dashboards.
Steps to Reproduce:
Open Edge DevTools console (F12) and run:
let fmt = new Intl.DateTimeFormat('en-US', {
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
});
console.log("format:", fmt.format(new Date()));
console.log("formatToParts:", JSON.stringify(fmt.formatToParts(new Date())));
console.log("resolvedOptions:", JSON.stringify(fmt.resolvedOptions()));
Expected Result (Chrome behavior):
format: 11:30:51 AM
formatToParts: [{"type":"hour","value":"11"},{"type":"literal","value":":"},{"type":"minute","value":"30"},{"type":"literal","value":":"},{"type":"second","value":"51"},{"type":"literal","value":" "},{"type":"dayPeriod","value":"AM"}]
resolvedOptions: {"locale":"en-US","calendar":"gregory","numberingSystem":"latn","timeZone":"America/Chicago","hourCycle":"h12","hour12":true,"hour":"2-digit","minute":"2-digit","second":"2-digit"}
Actual Result (Edge 145.0.3800.70 ):
format: (empty string)
formatToParts: []
resolvedOptions: {"locale":"en-US","calendar":"gregory","numberingSystem":"latn","timeZone":"America/Chicago","hourCycle":"h12","hour12":true}
Note that resolvedOptions in Edge is missing the hour, minute, and second fields entirely, confirming the options were silently dropped at construction time.
Additional Notes:
∙ Using timeStyle: 'medium' instead works correctly in Edge — this confirms the bug is isolated to the individual component options (hour, minute, second) code path
∙ Explicitly passing hour12: true alongside the options does not fix the issue
∙ Reproducible across all machines in our organization running this Edge version
∙ InPrivate mode does not resolve the issue, ruling out extensions or profile corruption
∙ No console errors or warnings are thrown, making this a silent failure that is very hard for developers to detect and diagnose
Workaround:
Use timeStyle shorthand instead of individual options:
// Broken in Edge 145.0.3800.70
new Intl.DateTimeFormat('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit' })
// Works in Edge 145.0.3800.70
new Intl.DateTimeFormat('en-US', { timeStyle: 'medium' })