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

Implement Duration::round and some general updates/fixes #24

Merged
merged 8 commits into from
Feb 25, 2024

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Feb 17, 2024

Currently a WIP.
EDIT: this is ready for review!

This PR is to implement Duration::round along with some other updates and ideally basic tests as well. The hope is to have this implemented and tested so that it can be used to switch over the internal duration slots from f64 to i32. 😄

A couple notes:

  1. I ended up switching rounding back to f64 for now / this PR. It had been u64, and my goal for the next PR is to head back in that direction. The truncation of values between integer types was causing some havoc and making debugging more difficult than it needed to be while dealing with round.
  2. Currently, the only testing is for floor rounding, but this can be added to if desired.

@nekevss nekevss changed the title WIP - Implement Duration::round and some general updates Implement Duration::round and some general updates/fixes Feb 21, 2024
@nekevss nekevss added this to the 0.1 Blocking milestone Feb 21, 2024
@nekevss nekevss marked this pull request as ready for review February 21, 2024 01:52
@nekevss nekevss added the C-enhancement New feature or request label Feb 24, 2024
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks good! Let's merge this and publish the first version of temporal_rs.

@jedel1043 jedel1043 merged commit b1093da into main Feb 25, 2024
5 checks passed
@jedel1043 jedel1043 deleted the duration-update branch February 25, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants