End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Date#ld
d.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. This is a whole number, which is adjusted by the offset as the local time.
Example
Date.new(2001,2,3).ld #=> 152784