Skip to content

Support full and short timezone name in amp-date-display component #35812

@jingfei

Description

@jingfei

Description

<amp-date-display> component supports a list of time parameters, yet the timezone name is not included. We'd like to use localized full and short timezone name as part of date display format. For example, momentjs provides short and full timezone name as the formatting option.

  • the full timezone name is expected to support different locale: we'd like to show 18:11:16 Taipei Standard Time for user in Taipei with english locale while 18:11:16 [台北標準時間] for user in Taipei with Chinese locale.
  • the short timezone name shows the abbreviated time zone name, e.g. PDT, PST, JST (example in momentjs)

Alternatives Considered

Currently we use data-options-* with timeStyle Intl.DateTimeFormat parameter in amp-date-display component as the workaround. It works well along with locale option (e.g. en-US story and ja-JP story), yet we figured the format is not flexible with timezone custom timestamp format. For example we're not able to show the format like HH:mm short-timezone --> 06:00 PST. Thus would like to have a FR to add full/short timezone as available parameters.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions