Skip to content

Modern Chrono Instant Add

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

Home › Date and Time (Chrono) › Chrono Date and Time › Instant.Add

Instant.Add

Returns the date-time moved forward by a TimeSpan.

Syntax

Instant.Add( span )

Examples

#import "std/chrono"
using chrono

dim as DateTime d = DateTime( 2026, 8, 13, 14, 30, 5, 123 )
print d.Add( TimeSpan.FromHours( 2 ) ).Hour       '' 16

'' IMMUTABLE -- the receiver is untouched
d.Add( TimeSpan.FromHours( 2 ) )
print d.Hour                 '' 14

Library: Chrono Date and Time
Category: Date and Time (Chrono)
Documented under: The Members

Clone this wiki locally