API Reference › Date › Date.add_days
method

Date.add_days

Date.add_days(date, n) -> int

The Date that is n days after date; pass a negative n to go backward. Rolls across month and year boundaries automatically.

Example

program Demo {
  handler Step phase Update {
    let tomorrow = Date.add_days(Date.new(2026, 12, 31), 1)   # 2027-01-01
  }
}
← All symbols