Product Site

5.4.6.40. addDays

Returns a new DateTime instance with a number of days added to the timestamp. The receiving instance is unchanged. The days value must be a valid number, including fractional values. Negative values result in days being subtracted.
Example 5.238. DateTime class — addDays method
date = .DateTime~new(2016, 6, 30)
say date              -- displays "2016-06-30T00:00:00.000000"
say date~addDays(1.5) -- displays "2016-07-01T12:00:00.000000"