Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Date#jd
() -> ::Integer
d.jd → integer
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_jd(VALUE self)
{
get_d1(self);
return m_real_local_jd(dat);
}
Returns the Julian day number. This is a whole number, which is adjusted by the offset as the local time.
Example
DateTime.new(2001,2,3,4,5,6,'+7').jd #=> 2451944 DateTime.new(2001,2,3,4,5,6,'-7').jd #=> 2451944