denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
96.19k stars 5.32k forks source link

`Temporal.ZonedDateTime#toLocaleString` with options includes unwanted fields #26076

Open lionel-rowe opened 1 week ago

lionel-rowe commented 1 week ago

Version: Deno 2.0.0

With --unstable-temporal enabled, Temporal.ZonedDateTime#toLocaleString with options includes unwanted fields.

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"

Both of the polyfills npm:@js-temporal/polyfill and npm:temporal-polyfill, as well as the reference implementation, give the expected result.

lionel-rowe commented 1 week ago

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?

lucacasonato commented 1 day ago

Yes, an upstream issue would be great.