Skip to content

fix(swift, native): validate RFC 3339 date-times - #3515

Open
schani wants to merge 3 commits into
fix/dart-lowercase-rfc3339from
fix/swift-lowercase-rfc3339
Open

fix(swift, native): validate RFC 3339 date-times#3515
schani wants to merge 3 commits into
fix/dart-lowercase-rfc3339from
fix/swift-lowercase-rfc3339

Conversation

@schani

@schani schani commented Sep 7, 2026

Copy link
Copy Markdown
Member

Swift decoders rejected RFC 3339 lowercase t and z. Normalize decoded strings before applying the existing date strategy in both Foundation variants.

PHP, Objective-C, and C++ accepted malformed calendar dates through permissive native parsers. Tighten their ISO date-time checks and add shared month-zero case 12, which each backend accepted before these fixes and rejects afterward.

Depends on #3511. Shared lowercase case 7 remains reserved for the pending Go fix.

Production diffs:

  • Swift lowercase parsing: 12 lines
  • PHP validation: 8 lines
  • Objective-C validation: 5 lines
  • C++ validation: 2 lines

Validation:

  • focused shared date-time fixtures pass for Swift, PHP, Objective-C, and C++
  • full Swift/schema-Swift fixtures pass
  • full native groups pass: PHP 141, Objective-C 145, C++ 153
  • build and lint pass

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

374 files differ — 374 modified, 0 new, 0 deleted
772 changed lines — +398 / −374

Open the generated-output report →

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch 3 times, most recently from a8cf6b3 to 2399eed Compare September 7, 2026 15:25
@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from 516a1de to 35b3f18 Compare September 7, 2026 15:27
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

374 files differ — 374 modified, 0 new, 0 deleted
772 changed lines — +398 / −374

Open the generated-output report →

@schani
schani force-pushed the agent/zod-date-time-validation-v2 branch from 2399eed to d328bcc Compare September 7, 2026 17:52
@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from 35b3f18 to c74b8d4 Compare September 7, 2026 18:00
@schani
schani changed the base branch from agent/zod-date-time-validation-v2 to fix/dart-lowercase-rfc3339 September 7, 2026 18:00
@schani
schani force-pushed the fix/dart-lowercase-rfc3339 branch from 36ea1c9 to 448cc9b Compare September 7, 2026 18:01
@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from c74b8d4 to 5261688 Compare September 7, 2026 18:02
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Generated-output differences

374 files differ — 374 modified, 0 new, 0 deleted
772 changed lines — +398 / −374

Open the generated-output report →

@schani
schani force-pushed the fix/dart-lowercase-rfc3339 branch from 448cc9b to d6ee70d Compare September 8, 2026 02:46
@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from c07cb7d to f362b87 Compare September 8, 2026 02:47
@schani schani changed the title fix(swift): accept lowercase RFC 3339 dates fix(swift, native): validate RFC 3339 date-times Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Generated-output differences

469 files differ — 469 modified, 0 new, 0 deleted
1383 changed lines — +879 / −504

Open the generated-output report →

@schani
schani force-pushed the fix/dart-lowercase-rfc3339 branch from d6ee70d to 45dbcc5 Compare September 8, 2026 03:05
@schani
schani force-pushed the fix/swift-lowercase-rfc3339 branch from f362b87 to 8dd8013 Compare September 8, 2026 03:05
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Generated-output differences

469 files differ — 469 modified, 0 new, 0 deleted
1383 changed lines — +879 / −504

Open the generated-output report →

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.

1 participant