- date:addDays(n)
- date:addMonths(n)
- date:addYears(n)
SYNOPSIS
DESCRIPTION
Adds the specified number of days, months or years, respectively, to the value stored in date. Negative values work as expected.
ERRORS
Raises an error if date is not a date instance.
EXAMPLE
>
>
>
>
>
d = clock.newDate(1990, 1, 1)
d:addDays(10)
d:addMonths(1)
d:addYears(2)
print(d)
1992-02-11