Skip to content

Accept whitespace around friendly dates again - #83

Merged
slominskir merged 1 commit into
mainfrom
friendly-date-trim
Oct 6, 2026
Merged

slominskir merged 1 commit into
mainfrom
friendly-date-trim

Conversation

@slominskir-coding-agent

Copy link
Copy Markdown
Contributor

What changed

  • ParamConverter: convertFriendlyDate and convertFriendlyDateTime strip whitespace around the value before parsing. 5.2.0 accepted it ( 10-Mar-2026, 10-Mar-2026 07:30 ), but the strict parsing added in 848ee02, not yet released, rejected it with "format error", as from a date pasted with a trailing space.
  • ParamConverterTest.convertFriendlyDatesIgnoreSurroundingWhitespace: leading, trailing, tab, and newline whitespace are accepted; a blank value is still an error, as in 5.2.0.

The rest of the strict parsing is unchanged: day 32, February 29 of a common year, and text after the date are still rejected.

Compatibility

This restores 5.2.0's behavior for these inputs, so apps need no step. One other input 5.2.0 accepted is still rejected, and the release notes should mention it: a time in the spring-forward gap, such as 08-Mar-2026 02:30, which 5.2.0 moved to 03:30.

Checks

  • Without the fix, the new test failed; with it, ParamConverterTest's 14 tests pass.
  • ./gradlew build passed.
  • After rebuilding the demo, ./gradlew integrationTest ran 107 tests, none failed or skipped. The demo's log has no errors.

🤖 Generated with Claude Code

Making the friendly date parsing strict (848ee02) also made it reject
whitespace before or after the date, such as from a pasted date, which
5.2.0 accepted. ParamConverter now strips it before parsing. Other
input it made strict, such as day 32 or text after the date, is still
rejected, and a blank value still is an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slominskir
slominskir merged commit 5ef8a52 into main Oct 6, 2026
7 checks passed
@slominskir
slominskir deleted the friendly-date-trim branch October 6, 2026 22:35
@slominskir-coding-agent slominskir-coding-agent Bot mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source::ai Work done by an AI agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant