/* * call-seq: * time.year => fixnum * * Returns the year for <i>time</i> (including the century). * * t = Time.now #=> Wed Apr 09 08:56:04 CDT 2003 * t.year #=> 2003 */ static VALUE time_year(time) VALUE time; { struct time_object *tobj; GetTimeval(time, tobj); if (tobj->tm_got == 0) { time_get_tm(time, tobj->gmt); } return LONG2NUM((long)tobj->tm.tm_year+1900); }