Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Date.setTime

$date.setTime($hour, $min, $sec = 0) -> Date

Description

Set the time of the Date object, while keeping the same date.

$today = Date.today()
//= <Date 2021-07-29 00:00:00 +0000>

$afternoon = $today.setTime(15, 30)
//= <Date 2021-07-29 15:30:00 +0000>
//                   ^^^^^^^^

See Also