tc39 / proposal-stable-formatting

A TC-39 proposal to bring stable Intl-inspired formatting options to ECMAScript
12 stars 2 forks source link

How should Intl.DTF `timeZoneName` option be formatted in this proposal? #8

Open justingrant opened 1 year ago

justingrant commented 1 year ago

One interesting question would be how the timeZoneName option should be handled. It seems reasonable to use the IXDTF format (the one we're working with IETF to specify) like 2020-12-25T12:34:56[America/Los_Angeles].

This formatting can also be delegated to Temporal AOs if needed.

It also makes sense to specify in this proposal whether the options bag {timeZoneName: "long"} should assume a full date should be shown like 2020-01-01[America/Los_Angeles], or if only America/Los_Angeles should be returned. I assume the former for backwards compatibility?

eemeli commented 1 year ago

Using the IXDTF format does sound sensible.

It also makes sense to specify in this proposal whether the options bag {timeZoneName: "long"} should assume a full date should be shown like 2020-01-01[America/Los_Angeles], or if only America/Los_Angeles should be returned. I assume the former for backwards compatibility?

I don't think that's necessarily within scope; the behaviour should match what's used with other locales.