-
Notifications
You must be signed in to change notification settings - Fork 21
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
Switch from Moment.js to the Temporal API #321
Conversation
src/scripts/angry-tock.js
Outdated
*/ | ||
const m = () => moment.tz(ANGRY_TOCK_TIMEZONE); | ||
const m = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename this to t
or even something verbose like currentZonedDateTime()
?
const m = () => | |
const currenetZonedDateTime = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I put this on my mental checklist of things to come back and do and then forgot. But your comment also reminded me that I'd made this functionality available from the dates utility module, so I switched to using that. 😄
88e589d
to
0768aaa
Compare
Closing as ancient. |
Longterm WIP
The Temporal API is currently a TC39 stage 3 proposal, which means the API is nearly completed and is not expected to change much more before final approval. It will be a while yet before it has native implementations, but there's no reason we can't start playing with it now using the polyfill.
The goal of this WIP PR is to explore migrating every current use of Moment.js in Charlie to the Temporal API. Some of those may be harder than others, and may justify switching to a different library instead of using the Temporal API directly. Since there's no rush to make this change, a long-running PR seemed like a reasonable approach to figuring out what we should do.
The following parts of the bot rely on Moment.js and should be migrated:
This PR is a step towards addressing #295.