Skip to content

date: echo invalid input verbatim instead of as a Fluent number - #14675

Merged
sylvestre merged 1 commit into
uutils:mainfrom
Dummy-pixel-hash:date-invalid-date-echo-verbatim
Sep 18, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
Dummy-pixel-hash:date-invalid-date-echo-verbatim

Conversation

@Dummy-pixel-hash

Copy link
Copy Markdown
Contributor

Fixes #14669. Fixes #14670.

translate! hands Fluent a number whenever the argument parses as one, so date -d 1e9 reported invalid date '1000000000', -d -0 reported '0', and -d 9. reported '9'. The invalid-date and missing-plus messages echo what the user typed, so they now use translate_text!, following the documented guidance on that macro.

translate! hands Fluent a number whenever the argument parses as one,
so the error for -d 1e9 showed '1000000000', -d -0 showed '0', and
-d 9. showed '9'. Use translate_text! for the invalid-date and
missing-plus messages, which echo what the user typed.

Fixes uutils#14669. Fixes uutils#14670.
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/misc/tty-eof (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!

@sylvestre
sylvestre merged commit 58bc4fa into uutils:main Sep 18, 2026
103 checks passed
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

Successfully merging this pull request may close these issues.

bug(date): The error displays a 0 instead of -0 bug(date): some errors are weird

2 participants