We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
datetimeIn
datetimeIn(date, timezone, optionalPrecision) could take a local time and shift it to another timezone.
datetimeIn(date, timezone, optionalPrecision)
Use case: “what time is it now in [somewhere far away]?”
How we could make it work:
Date
Intl.DateTimeFormat
new Intl.DateTimeFormat('en-GB', { dateStyle: 'short', timeStyle: 'long', timeZone: 'America/New_York' }).format(date); // '03/05/2021, 17:28:22 GMT-4'
(Also, check what Moments and others are doing.)
The text was updated successfully, but these errors were encountered:
Issue updated.
Sorry, something went wrong.
No branches or pull requests
datetimeIn(date, timezone, optionalPrecision)
could take a local time and shift it to another timezone.Use case: “what time is it now in [somewhere far away]?”
How we could make it work:
Date
object.Intl.DateTimeFormat
to transform the timezone to the specified location, e.g.:(Also, check what Moments and others are doing.)
The text was updated successfully, but these errors were encountered: