Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Date#ld

d.ld → integer

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
See also #julian? #leap? #julian #marshal_dump_old also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1