Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Date#ld
() -> ::Integer
ld → integer
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_ld(VALUE self)
{
get_d1(self);
return f_sub(m_real_local_jd(dat), INT2FIX(2299160));
}
Returns the Lilian day number, which is the number of days since the beginning of the Gregorian calendar, October 15, 1582.
Example
Date.new(2001, 2, 3).ld # => 152784