API Reference › Date › Date.to_epoch
method

Date.to_epoch

Date.to_epoch(date) -> int

The instant at midnight (00:00:00 UTC) of the given Date, as a DateTime (seconds since 1970). Bridges a calendar day back to the wall-clock timeline.

Example

program Demo {
  handler Step phase Update {
    let t = Date.to_epoch(Date.new(2026, 8, 30))
  }
}
← All symbols