month()
public
Show source
/*
* call-seq:
* time.mon => fixnum
* time.month => fixnum
*
* Returns the month of the year (1..12) for <i>time</i>.
*
* t = Time.now
* t.mon
* t.month
*/
static VALUE
time_mon(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_mon+1);
}