Method: Date#cweek

Defined in:
date_core.c

#cweekInteger

Returns commercial-date week index for self (see Date.commercial):

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

Returns:

  • (Integer)


5402
5403
5404
5405
5406
5407
# File 'date_core.c', line 5402

static VALUE
d_lite_cweek(VALUE self)
{
    get_d1(self);
    return INT2FIX(m_cweek(dat));
}