Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Date#ajd
() -> ::Rational
d.ajd → rational
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_ajd(VALUE self)
{
get_d1(self);
return m_ajd(dat);
}
Returns the astronomical Julian day number. This is a fractional number, which is not adjusted by the offset.
Example
DateTime.new(2001,2,3,4,5,6,'+7').ajd #=> (11769328217/4800) DateTime.new(2001,2,2,14,5,6,'-7').ajd #=> (11769328217/4800)