Method: Time#month
- Defined in:
- time.c
#mon ⇒ Integer
Returns the integer month of the year for self, in range (1..12):
t = Time.new(2000, 1, 2, 3, 4, 5, 6)
# => 2000-01-02 03:04:05 +000006
t.mon # => 1
Related: Time#year, Time#hour, Time#min.
4784 4785 4786 4787 4788 4789 4790 4791 4792 |
# File 'time.c', line 4784 static VALUE time_mon(VALUE time) { struct time_object *tobj; GetTimeval(time, tobj); MAKE_TM(time, tobj); return INT2FIX(tobj->vtm.mon); } |