Skip to content

Allow "now" as a valid datetime argument- #2 - #1096

Merged
tomchop merged 5 commits into
log2timeline:mainfrom
mariuszllmitwin:main
Aug 21, 2026
Merged

tomchop merged 5 commits into
log2timeline:mainfrom
mariuszllmitwin:main

Conversation

@mariuszllmitwin

Copy link
Copy Markdown
Contributor

Summary

  • Extend DatetimeValidator to accept the special value now (case-insensitive) and resolve it to the current UTC time.
  • Reuse the same parsing helper for order comparisons (before / after) so recipe params can also use now.
  • EndTimeValidator inherits the behavior; when now includes a time component it is not forced to end-of-day.

Test plan

  • Unit tests for DatetimeValidator with now / NOW / Now
  • Unit test that EndTimeValidator accepts now without rewriting to 23:59:59
  • Existing datetime validator tests still pass
Open in Web Open in Cursor 

mariuszllmitwin and others added 5 commits August 20, 2026 15:41
When recipe args embed @tokens in a larger string and those tokens
resolve to datetime.datetime, expand them with isoformat() instead of
replacing the entire argument. Bare @token values still pass through
the datetime object so modules continue to receive typed datetimes.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mariuszllmitwin <mariuszllmitwin@users.noreply.github.com>
DatetimeValidator and EndTimeValidator accept the special value
"now" (case-insensitive) and resolve it to the current UTC time.

Co-authored-by: mariuszllmitwin <mariuszllmitwin@users.noreply.github.com>
now always includes a time component, and EndTimeValidator already
covers non-midnight values via the existing timed-string case.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mariuszllmitwin <mariuszllmitwin@users.noreply.github.com>

@tomchop tomchop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@tomchop
tomchop merged commit 5665d73 into log2timeline:main Aug 21, 2026
11 checks passed
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.

3 participants