Closed sharkdp closed 3 months ago
Adds calendar_add and calendar_sub which can be used to do DST and leap-year aware calendar arithmetic on DateTimes:
calendar_add
calendar_sub
DateTime
>>> calendar_add(now(), 40 days) = 2024-09-10 21:07:41 CEST (UTC +02), Europe/Berlin [DateTime] >>> calendar_sub(now(), 6 months) = 2024-02-01 21:07:53 CET (UTC +01), Europe/Berlin [DateTime] >>> date("2000-01-01") -> weekday = "Saturday" [String]
Adds
calendar_add
andcalendar_sub
which can be used to do DST and leap-year aware calendar arithmetic onDateTime
s: