End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Time#mday
time.mday → integer
time.c
View on GitHub ↗
static VALUE
time_mday(VALUE time)
{
struct time_object *tobj;
GetTimeval(time, tobj);
MAKE_TM(time, tobj);
return INT2FIX(tobj->vtm.mday);
}
Returns the day of the month (1..31) for time.
Example
t = Time.now #=> 2007-11-19 08:27:03 -0600 t.day #=> 19 t.mday #=> 19