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

Tap performance followup, fixes and specs #414

Merged
merged 2 commits into from
Mar 31, 2017

Conversation

moonboots
Copy link
Collaborator

to: @majapw @lencioni

Bug in my previous isSameDay change. Moment's .day() unfortunately returns day of week, not day of month like I thought. I didn't realize the PR was going to be merged (was adding specs for the modifiers changes, starting to add specs for isSameDay when I realized the error).

Jack Zhang added 2 commits March 30, 2017 18:00
@@ -2,8 +2,5 @@ import moment from 'moment';

export default function isSameDay(a, b) {
if (!moment.isMoment(a) || !moment.isMoment(b)) return false;
// Speeding up by comparing most likely to differ unit first
return a.day() === b.day() &&
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moment's day of month function is .date() 😓

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait why are we changing this back completely

@coveralls
Copy link

Coverage Status

Coverage remained the same at 87.322% when pulling 0d0c702 on moonboots:jack-tap-perf-fixes-specs into fafa451 on airbnb:master.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. we should probably add a test case for isSameDay that would catch that breakage.

@moonboots moonboots merged commit e08cde3 into react-dates:master Mar 31, 2017
@moonboots
Copy link
Collaborator Author

Thanks, will do

@moonboots moonboots deleted the jack-tap-perf-fixes-specs branch March 31, 2017 01:20
@moonboots moonboots mentioned this pull request Mar 31, 2017
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

Successfully merging this pull request may close these issues.

3 participants