Mega Code Archive

 
Categories / Ruby / Time
 

Find out the hour of the day and the number of minutes and seconds on that hour

stop = Time.local( 20, 15, 1, 30, "jan", 2007, 2, 30, false, "MST") stop.hour # => 4 stop.min # => 13 stop.sec # => 0