-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Labels
runtimeIssues or PRs related to kcl runtime including value and value opertionsIssues or PRs related to kcl runtime including value and value opertions
Description
Discussed in kcl-lang/community#25
Originally posted by blut January 27, 2026
At the moment all datetime function relate to the current time.
I was trying to render a step-wise iteration of a token expiration date but did not find a way to implement this with datetime.
Logically:
_expireAt = current?.expireAt or ""
if _expireAt == "" or float(_expireAt) < datetime.ticks() + 60 * 60 * 24 * 3:
_expireAt = str(datetime.ticks() + 60 * 60 * 24 * 15)
-> render into %Y-%m-%d
And the last step was the one I had issues with.
Instead I created a schema and a epoch -> date object
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
runtimeIssues or PRs related to kcl runtime including value and value opertionsIssues or PRs related to kcl runtime including value and value opertions