set month
Sets the month component of a datetime
(datetime subject, long month) -> datetime
Returns datetime subject
with the month component set to month
.
If the day of month is invalid for the resulting datetime, it is changed to the last valid day of the month.
Returns nil
if any argument is nil
.
Parameters
Name | Type | Description |
---|---|---|
subject |
datetime | The datetime to work with |
month |
long | The month to set - in range of 1-12 |