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

feat: Implement Duration #47

Merged
merged 1 commit into from
Jan 31, 2024
Merged

feat: Implement Duration #47

merged 1 commit into from
Jan 31, 2024

Conversation

chrisimcevoy
Copy link
Owner

Implements the Duration class.

Besides porting the corresponding Noda Time struct, there are a few differences/additions:

  • Duration.FromTimeSpan()/Duration.ToTimeSpan() has been implemented as Duration.to_timedelta() and Duration.from_timedelta()
  • Added initial support for microseconds, as this is probably a more common resolution for Python developers than ticks or nanoseconds. This includes:
    • Additions to PyodaConstants
    • Additional properties/methods such as Duration.microseconds, Duration.from_microseconds...

@chrisimcevoy chrisimcevoy changed the title feat: implement duration feat: Implement Duration Jan 31, 2024
@chrisimcevoy chrisimcevoy merged commit 10c1ab0 into main Jan 31, 2024
5 checks passed
@chrisimcevoy chrisimcevoy deleted the feat/implement-duration branch January 31, 2024 00:09
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.

1 participant