Skip to content

Ability to provide IANA time zone for date formatting #40865

@dimakuba

Description

@dimakuba

🚀 feature request

Description

Ability to provide IANA time zone for date formatting.

Describe the solution you'd like

before:

const date = new Date();
const format = 'short';
const locale = 'tr';
const timezone = '+3'; // offset from GMT

formatDate(date, format, locale, timezone);

after:

const date = new Date();
const format = 'short';
const locale = 'tr';
const timezone = 'Europe/Istanbul'; // IANA time zone

formatDate(date, format, locale, timezone);

For now it's possible to provide time zone offset from GMT (such as '+0430'), but would be great to have an option to provide IANA time zone with Intl.DateTimeFormat instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions