Repository navigation
Allow "now" as a valid datetime argument- #2 - #1096
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DatetimeValidatorto accept the special valuenow(case-insensitive) and resolve it to the current UTC time.before/after) so recipe params can also usenow.EndTimeValidatorinherits the behavior; whennowincludes a time component it is not forced to end-of-day.Test plan
DatetimeValidatorwithnow/NOW/NowEndTimeValidatoracceptsnowwithout rewriting to 23:59:59