Skip to content

setHours()

Returns a new date with the hours field replaced.

Example:

ts
setHours(new Date('2024-03-15T12:00:00'), 9);

Released under the MIT License.