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

Proposal: Retrofit time HTML tag to support intl.DateTimeFormat #9592

Closed
bahrus opened this issue Aug 9, 2023 · 3 comments
Closed

Proposal: Retrofit time HTML tag to support intl.DateTimeFormat #9592

bahrus opened this issue Aug 9, 2023 · 3 comments

Comments

@bahrus
Copy link

bahrus commented Aug 9, 2023

This proposal is a kind of companion proposal to the number/measurement/quantity tag proposal.

Add an attribute to the time html tag. Possible names:

  1. deriveText
  2. deriveTextFromDateTime
  3. contentFromDateTime

or some other similar name. This would ensure backwards compatibility.

With the presence of such an attribute, we could add all the properties that intl.DateTimeFormat supports, e.g.:

  1. lang (already supported global attribute).
  2. dateStyle
  3. timeStyle
  4. timeZone

etc.

If none of these are provided, maybe just set the text based on toLocaleDateString().

@bahrus
Copy link
Author

bahrus commented Aug 9, 2023

Looks like this is somewhat of a duplicate of this issue.

@bahrus
Copy link
Author

bahrus commented Aug 9, 2023

Evidence of demand.

@domenic
Copy link
Member

domenic commented Aug 9, 2023

Closing as a duplicate, to discourage future double-posting.

@domenic domenic closed this as completed Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants