Datetime.hour read/write property



The Datetime.hour property returns a number representing the hour of the moment. Valid values are from 0 through 23.

Setting the hour property with a value lower or higher will throw an error.

Example

-- prints the current hour, for example "12" print(sys.Datetime().hour)