Method: Time#day

Defined in:
time.c

#mdayInteger

Returns the integer day of the month for self, in range (1..31):

t = Time.new(2000, 1, 2, 3, 4, 5, 6)
# => 2000-01-02 03:04:05 +000006
t.mday # => 2

Related: Time#year, Time#hour, Time#min.

Returns:

[View source]

4760
4761
4762
4763
4764
4765
4766
4767
4768
# File 'time.c', line 4760

static VALUE
time_mday(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    MAKE_TM(time, tobj);
    return INT2FIX(tobj->vtm.mday);
}