17.2 Arithmetic
Time ± Duration → Time,Time − Time → Duration,Instant − Instant → Duration.Date ± Period → Date,ZonedTime ± Period → ZonedTime(calendar-wise, taking daylight saving transitions into account),ZonedTime ± Duration → ZonedTime(exactly).2dis exactly 48 hours (Duration);2.daysis two calendar days (Period).ldt.in(tz): when ambiguous (clocks set back) the earlier time is chosen by default,ldt.in(tz, .Later)— the later one,.Reject— an error; a non-existent time (clocks set forward) is shifted forward.- Comparison and arithmetic between different kinds of time (for example
TimeandZonedTime) is a compile error; conversion is explicit:zt.time,t.in(tz). - Adding a
Periodto aTimeis forbidden:Timehas no calendar.
Related diagnostics
Source: docs/spec/oxl-standard.en.md