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

Out of order durations should not be accepted #76

Open
davidhewitt opened this issue Oct 21, 2024 · 0 comments
Open

Out of order durations should not be accepted #76

davidhewitt opened this issue Oct 21, 2024 · 0 comments

Comments

@davidhewitt
Copy link
Contributor

davidhewitt commented Oct 21, 2024

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.

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