fix(java, swift): reject invalid calendar dates - #3521
Conversation
a6a5f5a to
f5f8445
Compare
9b79b9f to
d196c03
Compare
Generated-output differences374 files differ — 374 modified, 0 new, 0 deleted |
d196c03 to
2360350
Compare
Generated-output differences374 files differ — 374 modified, 0 new, 0 deleted |
|
This should not change every generated output. Only those that actually have those date types! |
3c3d4d6 to
5e404d2
Compare
2360350 to
248d262
Compare
Generated-output differences374 files differ — 374 modified, 0 new, 0 deleted |
|
Scoped the date parsing helpers to outputs whose type graph contains dates. Added a unit test covering helper presence for date-time output and absence from unrelated output. The complete fix is 24 production lines and has been approved. |
Generated-output differences37 files differ — 37 modified, 0 new, 0 deleted |
5e404d2 to
02215b0
Compare
d6c6d18 to
655d656
Compare
Generated-output differences37 files differ — 37 modified, 0 new, 0 deleted |
655d656 to
f46fd23
Compare
Generated-output differences675 files differ — 675 modified, 0 new, 0 deleted |
Java and Swift date parsers normalized impossible calendar dates such as 2023-02-29 and 1900-02-29 instead of rejecting them. Use strict Java parsing and compare Swift's parsed date components with the input so both languages reject rollovers while retaining valid leap dates.
Swift date helpers are emitted only when generated types use dates. Shared invalid-calendar cases 9 and 11 exercise both fixes in this PR.
Production diffs:
Validation: