@date
Parse a date string into a Unix timestamp, with an optional offset.
Returns: number
Syntax
Section titled “Syntax”@date(date offset?)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
date |
string |
ISO 8601 date string or now |
[offset] |
string |
Time offset (e.g. +1d, -2h, +3mo) |
Examples
Section titled “Examples”# Parse an ISO date to Unix timestampset $ts @date(2025-01-01)
# Current timestampset $now @date(now)
# With positive offsetset $future @date(2025-01-01 +1d)
# With negative offsetset $yesterday @date(2025-01-01 -1d)See Also
Section titled “See Also”- wait — wait between actions (advances time in simulations)