Skip to content

Comments

date: fix inconsistent input parsing between -s and -d flags#9690

Merged
sylvestre merged 3 commits intouutils:mainfrom
AnarchistHoneybun:bug/date-input-parsing-9679
Dec 19, 2025
Merged

date: fix inconsistent input parsing between -s and -d flags#9690
sylvestre merged 3 commits intouutils:mainfrom
AnarchistHoneybun:bug/date-input-parsing-9679

Conversation

@AnarchistHoneybun
Copy link
Contributor

Add allow_hyphen_values(true) to -s flag to accept hyphen-prefixed values like '-3 days', making it consistent with -d flag behavior and GNU coreutils compatibility.

Fixes #9679

@sylvestre
Copy link
Contributor

Could you please add a test to make sure we don't regress?

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/inotify-dir-recreate is now passing!

Add allow_hyphen_values(true) to -s flag to accept hyphen-prefixed values like '-3 days', making it consistent with -d flag behavior and GNU coreutils compatibility.

Fixes uutils#9679
@AnarchistHoneybun AnarchistHoneybun force-pushed the bug/date-input-parsing-9679 branch from f6e7b20 to 91a4d5b Compare December 18, 2025 09:42
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/inotify-dir-recreate is now passing!

@AnarchistHoneybun
Copy link
Contributor Author

@sylvestre could I get a review on this

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/misc/nohup is no longer failing!
Note: The gnu test tests/tail/inotify-dir-recreate is now being skipped but was previously passing.

@sylvestre sylvestre merged commit 64478ac into uutils:main Dec 19, 2025
125 of 127 checks passed
CrazyRoka pushed a commit to CrazyRoka/coreutils that referenced this pull request Dec 28, 2025
…9690)

Add allow_hyphen_values(true) to -s flag to accept hyphen-prefixed values like '-3 days', making it consistent with -d flag behavior and GNU coreutils compatibility.

Fixes uutils#9679
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.

date: inconsistent input parsing between -s and -d

2 participants