-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Remove date auto type conversions #5982
Conversation
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.
2 small comments
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.
While I agree with the changes in adapter.moment.js
(and Date.now()
), I don't think there is any good reason to remove the +
to cast to number in scale.time.js
.
These were mostly no-ops now that we have timestamps
new Date().getTime()
is more than twice as fast as+new Date()
andDate.now()
faster still. https://jsperf.com/new-date-timingIt also appears to be faster not to use
+moment
as well. https://jsperf.com/moment-getvalueRelated to #5960