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

Add API to construct "synthetic" Temporal.TimeZone objects? #332

Closed
ptomato opened this issue Jan 27, 2020 · 4 comments
Closed

Add API to construct "synthetic" Temporal.TimeZone objects? #332

ptomato opened this issue Jan 27, 2020 · 4 comments

Comments

@ptomato
Copy link
Collaborator

ptomato commented Jan 27, 2020

@gibson042>

time zone objects consist fundamentally of a collection of rules describing when and how local time transitions between (UTC) offsets. Although a time zone can be looked up from a common database by name, it's not a name—it's a data structure, and constructing a time zone from scratch is an important use case (cf. getTimeZoneObjectFromRules, among others).

We don't currently have anything like this in the spec or the polyfill. What should this API look like?

@littledan
Copy link
Member

To construct a timezone from scratch, #300 lets any object which implements a few methods be used wherever a timezone could be used.

@ljharb
Copy link
Member

ljharb commented Jan 28, 2020

Presumably there’s a constructor one can extend as well?

@littledan
Copy link
Member

@ljharb Yes, see #300 for proposed details.

@ptomato
Copy link
Collaborator Author

ptomato commented Feb 18, 2020

OK, closing this in favour of #300.

@ptomato ptomato closed this as completed Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants