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 parsing of special unit formats #277

Merged
merged 7 commits into from
Oct 4, 2023

Conversation

olbrich
Copy link
Owner

@olbrich olbrich commented Jan 14, 2023

oddball formats like ft-in, lbs-oz, and stone-lbs did not handle negative values or when the secondary unit contained a fraction. These would yield incorrect values instead of failing.

fixes #276
fixes #104

Fixes #276

- update the regex used for feet-inch notation to handle signed ints, and rational parts
@olbrich olbrich self-assigned this Jan 14, 2023
@olbrich olbrich added the bug label Jan 14, 2023
@olbrich olbrich marked this pull request as ready for review January 14, 2023 19:08
Note: the time format HH::mm:ss,nsec is gone now in favor of HH::mm:ss.SSS which better lines up with how times are parsed by Time class.
…d ounces, etc..

This is more in line with how these formats are used in practice.
WARNING: If you want precision, don't use these formats.
@olbrich olbrich added the Major incompatible API changes label Oct 4, 2023
@olbrich olbrich merged commit 1f9aa15 into master Oct 4, 2023
10 of 12 checks passed
@olbrich olbrich deleted the olbrich/issue276-5-3/4-doesnt-parse-correctly branch October 4, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Major incompatible API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5' 3/4" doesn't parse correctly Stack level too deep error
1 participant