Is there any way to get the hour/minute value of a DateTime object?

This may be a stupid question, but I have been exploring the methods
of DateTime and Time and am unable to find anything that extracts just
the minute or the hour. Am I going to have to write my own functions
to do this?

Nevermind I just figured it out by creating a DateTime object:
d = DateTime.new
and then exploring all of its methods:
d.methods

the method for minute is min, i was using minute. hour is just hour.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs