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

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

Open
jfinkels opened this issue Feb 22, 2025 · 2 comments
Open
Labels

Comments

@jfinkels
Copy link
Collaborator

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
@BigPapa314
Copy link
Contributor

Seams that the format strings are processed by chrono so it might seam to have to be fixed there.

@BigPapa314
Copy link
Contributor

Opened an issue: #1663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants