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

Assigning a fixed “now”, system time zone, preferred calendar? #1568

Closed
rauschma opened this issue Jun 24, 2021 · 2 comments
Closed

Assigning a fixed “now”, system time zone, preferred calendar? #1568

rauschma opened this issue Jun 24, 2021 · 2 comments

Comments

@rauschma
Copy link
Contributor

This may be a silly suggestion, but when writing about Temporal, I find myself wishing that I could assign a fixed “now”, system time zone, and preferred calendar.

Use case: Show in (unit-tested) examples how Temporal.now.instant() etc., work.

(Feel free to close this issue immediately if this is beyond the scope of the API.)

@justingrant
Copy link
Collaborator

I think that there was discussion of this kind of testing use-case at some point. @gibson042 does this sound familiar?

@ptomato
Copy link
Collaborator

ptomato commented Jun 28, 2021

This is not a silly suggestion at all; we intend to have exactly such an example. This is being done in the pull request #1367 although I deprioritized it relative to actually getting the proposal to stage 3, and haven't had time to pick it back up again. It won't work as-is, it will need reworking to fit the changes that we made to get to stage 3; but the clock part I think should work unchanged.

Will close this, but we can continue any discussion in #603.

@ptomato ptomato closed this as completed Jun 28, 2021
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