set hour
Sets the hour component of a datetime
(datetime subject, long hour) -> datetime
Returns datetime subject
with the hour component set to hour
.
If resulting datetime is in a DST gap, the datetime is adjusted forward by the length of the gap.
Returns nil
if any argument is nil
.
Parameters
Name | Type | Description |
---|---|---|
subject |
datetime | The datetime to work with |
hour |
long | The hour to set - in range of 0-23 |