changes
This commit is contained in:
@@ -48,6 +48,14 @@ def resolve_value(expr, context):
|
||||
return now_in_context.date()
|
||||
return date.today()
|
||||
|
||||
if expr == "$today_str":
|
||||
now_val = context.get("now", datetime.now())
|
||||
if isinstance(now_val, datetime):
|
||||
return now_val.date().isoformat()
|
||||
elif isinstance(now_val, date):
|
||||
return now_val.isoformat()
|
||||
return date.today().isoformat()
|
||||
|
||||
if expr == "$now_iso":
|
||||
return datetime.now().isoformat(timespec='seconds')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user