Skip to content

Render 12/24 hour format according to user's preference #276

Description

@silverwind

The element currently render the hour format according to the local of the provided lang attribute, which when en or en-US will uses 12h clock format which is unexpected for users who are living in a region where the 24h format is the predominant format. See Wikipedia on which regions use which hour format.

I therefor propose to render the hour format in the user's preferred format that they have set in their OS, as determinable by Intl APIs. Specifically DateTimeFormat() accepts a hour12 option and the option for this value is determinable via various means. There is also a newer hourCycle option which also supports the 11-hour format, but this API is not yet widely supported in browsers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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