setHours

fun setHours(hours: Int, minutes: Int = definedExternally, seconds: Int = definedExternally, milliseconds: Int = definedExternally): Int(source)

Sets the hour value in the Date object using local time.

Parameters

hours

A numeric value equal to the hours value.

minutes

A numeric value equal to the minutes value.

seconds

A numeric value equal to the seconds value.

milliseconds

A numeric value equal to the milliseconds value.

MDN Reference