Method: Date#cwday

Defined in:
date_core.c

#cwdayInteger

Returns the commercial-date weekday index for self (see Date.commercial); 1 is Monday:

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

Returns:

  • (Integer)


5420
5421
5422
5423
5424
5425
# File 'date_core.c', line 5420

static VALUE
d_lite_cwday(VALUE self)
{
    get_d1(self);
    return INT2FIX(m_cwday(dat));
}