instance method
Date#cwyear
() -> ::Integer
cwyear → integer
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_cwyear(VALUE self)
{
get_d1(self);
return m_real_cwyear(dat);
}
Returns commercial-date year for self (see Date.commercial):
Example
Date.new(2001, 2, 3).cwyear # => 2001 Date.new(2000, 1, 1).cwyear # => 1999