Timestamp conversions, seconds differences and date/time comparison (touches rpg_eval.zig) #719

Manually merged
binjovi-bot merged 6 commits from l1g-dt-cmp into trunk 2026-11-04 14:06:28 +00:00
Owner

Timestamp conversions, seconds differences and date/time comparison (touches rpg_eval.zig)

rpg_date_convert.recover accepts the type word 113 that
%date(%timestamp()) and %time(%timestamp()) put between the two addresses,
with the measured result formats (date and time *ISO, separator byte 0);
dateConvertCall (rpg_eval.zig) writes them as %DATE(ts) and %TIME(ts).
dateDifferenceCall reads %diff(%timestamp() : T : *seconds) (26-byte
operands, duration id 0x12). Public twin statements that turn recovered:
h-now1 55, h-now2 37, 39 and 47. The %left(C: 3) statements (h-bifs-char 29, 30)
stop at control_flow (a guard around the length), not at a call.

_QRNX_DT_CMP has a catalog row and a rule (dateCompare in
rpg_eval_builtins.zig, the value date_compare and its fold in binary in
rpg_eval.zig). The five captures dtcmp-date-gt-d, dtcmp-d-gt-date,
dtcmp-date-eq-d, dtcmp-time-lt-t and dtcmp-t-lt-time (request l1/dt-cmp)
show the operand order: the operands are pushed in source order (the first
descriptor and the first address belong to the left operand), the call
returns the sign of b - a, and the swap with 0 that follows reads as
0 OP result, that is a OP b, for >, < and = alike. Public twin
statement that turns recovered: h-now1 57 (%date() > D). The five captures
are adopted as public twins; their matrix rows are classed after the next
matrix run (no pub400 job from this lane).

The matrix rows of
the five twins are left for the next matrix snapshot (class-audit.sh needs a
snapshot of them, which needs the host).

No effect on the held-out call line (oracle: unchanged for both rule sets).

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":1,"newly_clean":3,"clean_delta":3,"base":325,"new":328},"twins":{"groups":473,"recovered":465,"regressions":[],"newly":5},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/EXPERIMENTS/h-now1/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/h-now2/stripped/object.savf 3"],"worse":[]},"full_check":{"exit":0,"seconds":764}}
# Timestamp conversions, seconds differences and date/time comparison (touches rpg_eval.zig) `rpg_date_convert.recover` accepts the type word `113` that `%date(%timestamp())` and `%time(%timestamp())` put between the two addresses, with the measured result formats (date and time `*ISO`, separator byte 0); `dateConvertCall` (rpg_eval.zig) writes them as `%DATE(ts)` and `%TIME(ts)`. `dateDifferenceCall` reads `%diff(%timestamp() : T : *seconds)` (26-byte operands, duration id 0x12). Public twin statements that turn recovered: h-now1 55, h-now2 37, 39 and 47. The `%left(C: 3)` statements (h-bifs-char 29, 30) stop at control_flow (a guard around the length), not at a call. `_QRNX_DT_CMP` has a catalog row and a rule (`dateCompare` in rpg_eval_builtins.zig, the value `date_compare` and its fold in `binary` in rpg_eval.zig). The five captures dtcmp-date-gt-d, dtcmp-d-gt-date, dtcmp-date-eq-d, dtcmp-time-lt-t and dtcmp-t-lt-time (request l1/dt-cmp) show the operand order: the operands are pushed in source order (the first descriptor and the first address belong to the left operand), the call returns the sign of b - a, and the swap with `0` that follows reads as `0 OP result`, that is `a OP b`, for `>`, `<` and `=` alike. Public twin statement that turns recovered: h-now1 57 (`%date() > D`). The five captures are adopted as public twins; their matrix rows are classed after the next matrix run (no pub400 job from this lane). The matrix rows of the five twins are left for the next matrix snapshot (class-audit.sh needs a snapshot of them, which needs the host). No effect on the held-out call line (oracle: unchanged for both rule sets). ## 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":1,"newly_clean":3,"clean_delta":3,"base":325,"new":328},"twins":{"groups":473,"recovered":465,"regressions":[],"newly":5},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/EXPERIMENTS/h-now1/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/h-now2/stripped/object.savf 3"],"worse":[]},"full_check":{"exit":0,"seconds":764}} ```
binjovi-bot manually merged commit d68d0bb90d into trunk 2026-11-04 14:06:28 +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!719
No description provided.