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

Durations without units aren't valid durations #25

Open
Julian opened this issue Nov 28, 2022 · 0 comments
Open

Durations without units aren't valid durations #25

Julian opened this issue Nov 28, 2022 · 0 comments

Comments

@Julian
Copy link

Julian commented Nov 28, 2022

Hi! (Thanks for the library).

I believe the below isn't valid under the spec:

isoduration.parse_duration("P1")

which should be invalid, as it has no unit, but instead returns:

Duration(DateDuration(years=Decimal('0'), months=Decimal('0'), days=Decimal('0'), weeks=Decimal('0')), TimeDuration(hours=Decimal('0'), minutes=Decimal('0'), seconds=Decimal('0')))

#21 is possibly related.

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

No branches or pull requests

1 participant