Skip to content

date: edge cases for modifiers #10957

@ChrisDryden

Description

@ChrisDryden

Now that we have a library for handling modifiers in #10940, I spent a while fuzzing to see if I could make a list of some follow up tasks for modifier compatibility. These are the only two that I could find:

  1. %+ without explicit width adds a sign

examples:

date -d '1999-06-01' '+%+Y'

GNU: "1999"
uutils: "+1999"

  1. %_ without explicit width doesn't re-pad to the specifier's default width

examples:

date -d '1999-06-01' '+%_m'

gnu 9.10 gives: " 1"
uutils gives: "1"

This one is a bit more tricky because it would mean that we need to store a mapping for each specifiers default width

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions