Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intl.DateTimeFormat timeZone option #613

Open
binkztep opened this issue Apr 3, 2023 · 1 comment
Open

Intl.DateTimeFormat timeZone option #613

binkztep opened this issue Apr 3, 2023 · 1 comment

Comments

@binkztep
Copy link

binkztep commented Apr 3, 2023

why it is not supported? it would allow to display timezone in specific timezone

list of allowed options:

const DATETIME_ALLOWED = [

more than that, in Syntax guide its named as "Developers params", which intuitively feels like it should be supported https://projectfluent.org/fluent/guide/functions.html#partial-arguments

@eemeli
Copy link
Member

eemeli commented Apr 4, 2023

To set timeZone, you need to use a partially formatted FluentDateTime variable, and to set the option in its constructor. This is intentionally not possible via the DATETIME() message function as it could far too easily lead to mistakes. For the same reason, e.g. the currency option of FluentNumber needs to be set via a partially formatter variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants