Skip to content

Reject datetime when fraction digits are too large #229

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

Merged
merged 2 commits into from
Mar 1, 2025

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Mar 1, 2025

We were unwrapping rather than rejecting on the new to_nanosecond method for Fraction.

Context:
to_nanosecond returns an Option<u32>, which represents the nanoseconds value when the digits are < 9, but returns None if the digits exceed 9.

I think this mostly points towards a doc improvement needed in ixdtf that also links to to_truncated_nanosecond to show the difference between the two cases.

@raskad raskad merged commit f27e2ff into main Mar 1, 2025
8 checks passed
@jedel1043 jedel1043 deleted the fix-datetime-fraction branch March 1, 2025 20:26
@jedel1043 jedel1043 added the C-internal Internal library improvements label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-internal Internal library improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants