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

Fix addBusinessDays when input date is a weekend day (#1628) #1790

Merged
merged 1 commit into from Jul 17, 2020

Conversation

Matsuuu
Copy link
Contributor

@Matsuuu Matsuuu commented May 20, 2020

The functionality reduced a full week when the the amount of reducing was 5 or more. If the user gave a weekend date, this would land the user back on a weekend.

The fix introduced will fix this

@Matsuuu
Copy link
Contributor Author

Matsuuu commented May 20, 2020

The tests seem to fail on Travis, but when I run yarn test locally, they succeed.

Copy link
Member

@kossnocorp kossnocorp left a comment

Choose a reason for hiding this comment

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

Hey, thank you for PR. The tests fail because you get different local values in different time zones. Please use numbers.

src/addBusinessDays/test.js Outdated Show resolved Hide resolved
@Matsuuu
Copy link
Contributor Author

Matsuuu commented May 20, 2020

Allright now they seem to pass nicely! Thanks for the tip

@Matsuuu
Copy link
Contributor Author

Matsuuu commented Jun 3, 2020

Hi @kossnocorp . This could be merged now

Copy link
Member

@kossnocorp kossnocorp left a comment

Choose a reason for hiding this comment

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

Thank you a lot!

@kossnocorp kossnocorp merged commit d098e19 into date-fns:master Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants