-
Notifications
You must be signed in to change notification settings - Fork 47
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
Time unit recommendations and the TC39 Temporal proposal #101
Comments
Seems like a good idea. Let's evaluate it when that happens |
Hi @littledan what is the status of Temporal? |
@kenchris Temporal is still at Stage 2; we hope to propose it for Stage 3 later this year, but development continues to take longer than we expect. We'll come back to the TAG for another round of design review once the current round of changes has settled down. |
@littledan okay, thanks! We'll wait for that. |
Currently we recommend DOMTimeStamps, but it would be nice to replace them in Web APIs with an appropriate Temporal object. The closest I see seems to be Temporal.Absolute, but it's unclear how we could best make the change while maintaining compatibility. Any suggestions? |
This is no longer blocked, since it has advanced to Stage 3. |
As Temporal gets closer to shipping in web browsers, we should think about how we want to migrate APIs to use it. I think it's fairly clear that we'll add overloads to the operations that currently take a Temporal also treats strings as convertible to several kinds of Temporal objects (e.g. |
I think there are several enhancements that could be done here, either all at once or progressively, depending on how closely you would like to integrate Temporal APIs. Re. APIs that take DOMHighResTimeStampInstant support
ZonedDateTime support
Re. Time measurement with milliseconds
Design principles for new APIsTalking about APIs that don't exist yet, as an author of the proposal I'd love to see a recommendation to use Temporal types, but obviously I'm biased. The current text,
might need to be updated a bit. The existing situation was that It would be nice to have some recommendations for the case of exact vs. wall-clock times, and for what to do in the case of intentionally missing data. As an example of the former case, DOMHighResTimeStamp isn't a good way to express a wall-clock time since converting a time stamp to a wall-clock time requires time zone information, so As an example of missing data, a date picker might return a date without a time. It might be appropriate to recommend returning a |
The JavaScript Temporal proposal adds new date and time types to the web platform, and is at Stage 2 in TC39. If this becomes a standard, should the section of the "Client-side API Design Principles" be updated to recommend their use?
The text was updated successfully, but these errors were encountered: