today

today, function

def const pure today(): date
def const pure today(timezone: number): date

Returns the current wall-time date. The timezone argument is the offset in hours from UTC.

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

Remarks

today() is considered a compile-time constant, so it can be used to build read patterns when its arguments are constant.

User Contributed Notes
0 notes + add a note