End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Date#gregorian?
gregorian? → true or false
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_gregorian_p(VALUE self)
{
get_d1(self);
return f_boolcast(m_gregorian_p(dat));
}
Returns true if the date is on or after the date of calendar reform, false otherwise:
Example
Date.new(1582, 10, 15).gregorian? # => true (Date.new(1582, 10, 15) - 1).gregorian? # => false