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 calculatemonths() #173

Merged
merged 4 commits into from
May 7, 2021
Merged

Fix calculatemonths() #173

merged 4 commits into from
May 7, 2021

Conversation

joseccandido
Copy link

What does this do?

Switches to using raw duration from a day-clamped duration for the difference between lastRun and jobDay.

Which issue(s) does this PR fix/relate to?

Resolves #172

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler
Copy link
Contributor

@joseccandido could you add tests that highlight the failure you discovered in the issue? You can use the fake time interface to get the scheduler on exactly the time you want. Ideally, the test should fail without your commit and then pass with it.

@joseccandido
Copy link
Author

@JohnRoesler Added some tests. Please see if they suffice. As you mentioned, they pass with the commit and fail without.

Copy link
Contributor

@JohnRoesler JohnRoesler 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 @joseccandido! nice PR

@JohnRoesler JohnRoesler merged commit a32aed2 into go-co-op:master May 7, 2021
@joseccandido joseccandido deleted the fix-calculatemonths branch May 7, 2021 21:55
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.

[BUG] - calculateMonths() calculating wrong duration
2 participants