Date.+
+amount
Group: Operators
Aliases: add period
Documentation
Add the specified amount of time to this instant to get another date.
Arguments
amount
: The amount of time to add to this instant. It can be aPeriod
orDate_Period
.
Examples
Add 6 months to a local date.
import Standard.Base.Data.Time.Duration
example_add = Date.new 2020 + (Period.new months=6)
Add a month to a local date.
import Standard.Base.Data.Time.Date_Period
example_add = Date.new 2020 + Date_Period.Month