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 handling of negative time deltas #173

Merged
merged 5 commits into from
Feb 25, 2024

Commits on Feb 24, 2024

  1. Add test case

    hugovk committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    717ef71 View commit details
    Browse the repository at this point in the history
  2. Call abs on the whole datetime, not just parts

    Because a small delta can be represented as timedelta(days=-1, seconds=86399, microseconds=999999), so we should assume all components have the same sign
    hugovk committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    b939b2e View commit details
    Browse the repository at this point in the history
  3. Refactor

    hugovk committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    56ffcc8 View commit details
    Browse the repository at this point in the history
  4. Use constant test values

    hugovk committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    7941145 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ec99f29 View commit details
    Browse the repository at this point in the history