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

Use std duration with NaiveTime #895

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

esheppa
Copy link
Collaborator

@esheppa esheppa commented Nov 24, 2022

  • Add overflowing_add_opt and overflowing_sub_opt, similar to the existing overflowing_add_signed/overflowing_sub_signed. The implementations are a bit more complex as as they can no longer use negation. There may be opportunity for more shared code between overflowing_add_opt and overflowing_sub_opt
  • Add abs_diff and duration_since which are similar to signed_duration_since. Implementation of abs_diff is more verbose as it explicitly states all possible cases
  • Add and Sub for NaiveTime.
  • offset/fixed.rs has some impls updated to use the new APIs
  • Change NaiveDateTime impls to use the new API internally (they are now more verbose as have to handle positive and negative cases. These functions will be deprecated in 0.5 anyway (and could be in a future PR which implements similar functions using core::time::Duration)

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.

1 participant