Skip to content

Durations without units aren't valid durations #25

@Julian

Description

@Julian

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions