Method: Date#jd

Defined in:
date_core.c

#jdInteger

Returns the Julian day number. This is a whole number, which is adjusted by the offset as the local time.

DateTime.new(2001,2,3,4,5,6,'+7').jd  #=> 2451944
DateTime.new(2001,2,3,4,5,6,'-7').jd  #=> 2451944

Returns:

  • (Integer)


5248
5249
5250
5251
5252
5253
# File 'date_core.c', line 5248

static VALUE
d_lite_jd(VALUE self)
{
    get_d1(self);
    return m_real_local_jd(dat);
}