hour()
public
Show source
/*
* call-seq:
* time.hour => fixnum
*
* Returns the hour of the day (0..23) for <i>time</i>.
*
* t = Time.now
* t.hour
*/
static VALUE
time_hour(time)
VALUE time;
{
struct time_object *tobj;
GetTimeval(time, tobj);
if (tobj->tm_got == 0) {
time_get_tm(time, tobj->gmt);
}
return INT2FIX(tobj->tm.tm_hour);
}