A date field read into a character field and a date passed to %DIFF keep their type #738

Manually merged
binjovi-bot merged 3 commits from lr2-char-date-src into trunk 2026-11-06 14:48:17 +00:00
Owner

A date field read into a character field and a date passed to %DIFF keep their type

c = d; of a date, time or timestamp field into a character field is c = %CHAR(d); (it failed to compile with RNF7416). A field that a %DIFF statement names is a date, time or timestamp field when a statement assigns it a current built-in, even when its stored start value is not a date.

  • Probe lr2-db-date-ctl (the control, red test in src/rpg_time_assign_test.zig).
  • Probe lr2-di-lit-noassign (dictionary capture).
  • Probe lr2-di-lit-noassign: the field named only by %DIFF(%DATE(): f: *DAYS) and a stored date start value is date inz(d'2020-01-01') (it was char(10), RNF0581).

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","legend":"regenerated","emit":{"worse":[],"better":0,"newly_clean":2,"clean_delta":2,"base":373,"new":375},"twins":{"groups":551,"recovered":543,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":732}}
# A date field read into a character field and a date passed to %DIFF keep their type `c = d;` of a date, time or timestamp field into a character field is `c = %CHAR(d);` (it failed to compile with RNF7416). A field that a `%DIFF` statement names is a date, time or timestamp field when a statement assigns it a current built-in, even when its stored start value is not a date. - Probe `lr2-db-date-ctl` (the control, red test in `src/rpg_time_assign_test.zig`). - Probe `lr2-di-lit-noassign` (dictionary capture). - Probe `lr2-di-lit-noassign`: the field named only by `%DIFF(%DATE(): f: *DAYS)` and a stored date start value is `date inz(d'2020-01-01')` (it was `char(10)`, RNF0581). ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","legend":"regenerated","emit":{"worse":[],"better":0,"newly_clean":2,"clean_delta":2,"base":373,"new":375},"twins":{"groups":551,"recovered":543,"regressions":[],"newly":2},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":732}} ```
sean force-pushed lr2-char-date-src from 3d5c594cad
All checks were successful
binjovi/ci Binjovi completed the frozen plan
to 77116a9a86
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-11-06 14:36:57 +00:00
Compare
binjovi-bot manually merged commit 77116a9a86 into trunk 2026-11-06 14:48:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!738
No description provided.