method

hour

ruby latest stable - Class: DateTime

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

hour()
public

Returns the hour (0-23).

DateTime.new(2001,2,3,4,5,6).hour         #=> 4