add period
adds a calendar period to a datetime value
(datetime subject, long years, long months, long days) -> datetime
Adds a calendar period to given subject
datetime and returns the result.
Supply negative numbers to effectively subtract a period.
Returns nil
if any argument is nil
.
Parameters
Name | Type | Description |
---|---|---|
subject |
datetime | The datetime to add a calendar period to |
years |
long | The years to add |
months |
long | The months to add |
days |
long | The days to add |