Open lionel-rowe opened 1 week ago
Version: Deno 2.0.0
With --unstable-temporal enabled, Temporal.ZonedDateTime#toLocaleString with options includes unwanted fields.
--unstable-temporal
Temporal.ZonedDateTime#toLocaleString
Temporal.ZonedDateTime.from('2024-09-04T23:10:20+08:00[Asia/Shanghai]') .toLocaleString('en-US', { weekday: 'short' })
Expected: "Wed" Actual: "Wed, 9/4/2024, 11:10:20 PM GMT+8"
"Wed"
"Wed, 9/4/2024, 11:10:20 PM GMT+8"
Both of the polyfills npm:@js-temporal/polyfill and npm:temporal-polyfill, as well as the reference implementation, give the expected result.
npm:@js-temporal/polyfill
npm:temporal-polyfill
It looks like Deno's Temporal support is enabled by setting the --harmony-temporal v8 flag in deno_core, so should this be a Chromium issue?
--harmony-temporal
deno_core
Yes, an upstream issue would be great.
Version: Deno 2.0.0
With
--unstable-temporal
enabled,Temporal.ZonedDateTime#toLocaleString
with options includes unwanted fields.Expected:
"Wed"
Actual:"Wed, 9/4/2024, 11:10:20 PM GMT+8"
Both of the polyfills
npm:@js-temporal/polyfill
andnpm:temporal-polyfill
, as well as the reference implementation, give the expected result.