Skip to content

Expose a fixed clock for per-render strftime_now - #40

Merged
leehack merged 2 commits into
mainfrom
feature/public-time-formatting
Oct 25, 2026
Merged

leehack merged 2 commits into
mainfrom
feature/public-time-formatting

Conversation

@leehack

@leehack leehack commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Dinja's built-in strftime_now reads wall time on every call, preventing reproducible date-dependent templates.

Export strftimeNow(DateTime) for a fixed clock supplied through a render's context. Default renders keep their own wall clock. Both paths share validation, formatting limits and escaping. Prepare version 1.3.2 for llamadart #859.

The helper preserves captured/macro-produced input provenance before caller-function registration; this fixes the escaping defect found during independent review without changing ordinary caller-defined functions.

Validation at 9d36ce25a38c22e200f9c205405dbbb6daba68d6 against 3881b4240cf48884d8eba8f25292bb43d7ec802a:

  • Analysis/format and package publish dry run passed, with zero warnings.
  • VM: 1212 passed, 11 skipped. Maintained Chrome lane: 1103 passed, 11 skipped.
  • Fresh independent review: no blocking findings; original escaping repro plus 156 audit tests and full VM suite passed.
  • Hosted CI passed: https://github.com/leehack/dinja/actions/runs/40217674420.
  • No review threads. No package release published yet.

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