Skip to content

date: does not respect width/padding character in output format string #7344

@jfinkels

Description

@jfinkels

Steps to reproduce:

date -d "1999-12-08" +%03d

What happens now: uutils date terminates with an error message:

date: invalid format %03d

What I expected to happen: GNU date prints the day number with a width of three padded by zeros:

008

Notes: this is causing a failure in GNU test file tests/date/date.pl. This is not specific to %d:

$ date -d "1999-12-08" +%05y
00099
$ date -d "1999-12-08" +%05a
00Wed

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