API Reference › DateTime › DateTime.year
method

DateTime.year

DateTime.year(dt) -> int

The calendar year of the instant dt (UTC).

Example

program Demo {
  handler Step phase Update {
    let y = DateTime.year(DateTime.from(2000, 1, 1, 12, 30, 15))   # 2000
  }
}
← All symbols