Skip to content

add_months

In std/time.

fn add_months(self: Date, n: Int) : Date
fn add_months(self: DateTime, n: Int) : DateTime

self moved by n months, clamped to the last day of the month it lands in: Date("2026-01-31").add_months(1) is 2026-02-28.