Skip to content

Out of order durations should not be accepted #76

@davidhewitt

Description

@davidhewitt

In authoring #75 I noticed some potentially annoying edge cases we don't handle correctly:

    // FIXME: this is current behaviour, but we should probably error on
    // out-of order durations (not RFC3339 compliant)
    duration_all_wrong_order: ok => "P3D2M1YT6S5M4H", "P1Y63DT4H5M6S";
    // FIXME: this is current behaviour, but we should probably error on
    // repeated units (not RFC3339 compliant)
    duration_unit_repeated: ok => "P1Y2Y", "P3Y";

We should decide if we want to clean up our parsing to not accept these cases, and if so, how we deal with the fact this will make parsing stricter for users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions