Skip to content

Modern Chrono AddMonths

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Date and Time (Chrono) › Chrono Date and Time › AddMonths

AddMonths

Adds calendar months and leaves the UTC offset untouched.

Syntax

AddMonths( 1 )

Notes

  • calendar months, offset untouched.

Examples

#import "std/chrono"
using chrono

'' Exact-field arithmetic on the calendar: the offset is left untouched
dim as DateTime d = DateTime( 2026, 1, 31, 12, 0, 0, 0 )

print d.AddMonths( 1 ).ToIsoString( )    '' 2026-02-28T12:00:00 -- clamped

'' AddCalendarMonths is the same walk with the zone offset re-resolved
'' afterwards, which is what "same time next month" means where DST
'' changes in between

Library: Chrono Date and Time
Category: Date and Time (Chrono)
Documented under: Exact Arithmetic Vs Calendar Arithmetic

Clone this wiki locally