today
today, function
def const pure today(): date
def const pure today(timezone: number): date
def const pure today(timeZone: text): date
Returns the current wall-time date. Without an argument, today() returns the
date in UTC.
timezone: the offset in hours from UTC, between -24 and 24 (inclusive).timeZone: a canonical IANA time zone identifier, such as"Europe/Paris"or"America/New_York".
Examples
show summary "Today" with
today() as "UTC"
today(-8) as "UTC-8"
This outputs the following summary:
| UTC | UTC-8 |
|---|---|
| 2025-12-21 | 2025-12-20 |
table T = extend.range(3)
T.Offset = T.N - 2
show table "Dates over timezones" with
if T.Offset >= 0 then "UTC+\{T.Offset}" else "UTC\{T.Offset}" as "UTC"
today(T.Offset) as "Date"
This outputs the following table:
| UTC | Date |
|---|---|
| UTC-1 | 2025-12-20 |
| UTC+0 | 2025-12-21 |
| UTC+1 | 2025-12-21 |
The text overload accounts for the time zone’s UTC offset and daylight-saving
rules. For example, today("Europe/Paris") returns the current date in Paris.
The timeZone argument may also be a vector, such as
today(Zones.TimeZone).
Remarks
today() is considered a compile-time constant, so it can be used to build
read patterns when its arguments are constant. The overloads also accept
runtime vectors and return one date per input value.
Errors
The text timeZone must be a canonical IANA identifier. Aliases such as
"US/Eastern" and identifiers under Etc/*, such as "Etc/UTC", are
rejected.