Method: Date#mon

Defined in:
ext/date/date_core.c

#monFixnum #monthFixnum

Returns the month (1-12).

Date.new(2001,2,3).mon    #=> 2

Overloads:

  • #monFixnum

    Returns:

    • (Fixnum)
  • #monthFixnum

    Returns:

    • (Fixnum)


4932
4933
4934
4935
4936
4937
# File 'ext/date/date_core.c', line 4932

static VALUE
d_lite_mon(VALUE self)
{
    get_d1(self);
    return INT2FIX(m_mon(dat));
}