Skip to content

date: fix %#P case-swap on lowercase am/pm #11659#11671

Merged
cakebaker merged 1 commit intouutils:mainfrom
vishakha1411:fix-date-case-flag-alt-ampm
Apr 6, 2026
Merged

date: fix %#P case-swap on lowercase am/pm #11659#11671
cakebaker merged 1 commit intouutils:mainfrom
vishakha1411:fix-date-case-flag-alt-ampm

Conversation

@vishakha1411
Copy link
Copy Markdown
Contributor

Fixes #11659

%P already returns lowercase am/pm. The current # handling uppercases any non-uppercase value, so %#P becomes PM. GNU keeps %#P as pm. Adjusted the case-swap logic to leave already-lowercased alt-specifier unchanged.

The test_date_strftime_case_flag_on_alt_ampm() test case now passes.
image

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/symlink (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)

@cakebaker cakebaker merged commit b41d591 into uutils:main Apr 6, 2026
168 of 169 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks for your PR!

@vishakha1411 vishakha1411 deleted the fix-date-case-flag-alt-ampm branch April 6, 2026 12:12
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: %#P case-swap flag incorrectly uppercases already-lowercase alt specifier

2 participants