-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Address Child Blocks feedback #7012
Conversation
Date.now() returns the current time in milliseconds, but we were comparing it against constants measured in seconds.
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.
👍
const SECONDS_PER_DAY = 24 * 3600; | ||
const SECONDS_PER_WEEK = 7 * 24 * 3600; | ||
const MILLISECONDS_PER_HOUR = 3600 * 1000; | ||
const MILLISECONDS_PER_DAY = 24 * 3600 * 1000; |
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.
Nit, those constants can use previous declarations:
const MILLISECONDS_PER_DAY = 24 * MILLISECONDS_PER_HOUR;
const MILLISECONDS_PER_WEEK = 7 * MILLISECONDS_PER_DAY;
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.
Thanks for considering the feedback 👍
Addresses various feedback left by @aduth on #6753.