Link Search Menu Expand Document

Date.SetHours Method

Explanation Set the hour part in local time.
The omitted parameter items are not changed.
Call format d.SetHours (value [, min [, sec [, ms ]]])
Return value None
Arguments integer value Specify the hour as a 24 -hour clock.
integer min Specify the minute as a number.
integer sec Specify the seconds numerically.
integer ms Specify the millisecond. The resolution accuracy of the Date class is 1 second, so even if you specify ms, it does not affect the result.
Exception None
Example of use
var d = new Date ();
print (d, "¥ n");
d.setHours (13);
print (d, "¥ n");
Related item