julian-date
ErrorsCollection

julian-date

Synthesised documentation from type/DateTime

From type/DateTime

See Original text in context

method julian-date(DateTime:D: --> Real:D)

Returns the Julian date (JD) for the UTC date and time.

say DateTime.new('2021-12-24T12:23:00.43Z').julian-date# OUTPUT: «2459573.0159772␤»

The julian-date starts at zero at the epoch of noon UTC on November 24, 4714 B.C. on the proleptic Gregorian calendar (the calendar in use in much of the world and in international commerce and travel). The JD is used in astronomy to define times of celestial objects transiting the Earth's Prime Meridian. For any instant, it is the sum of the number of whole days and the fraction of a day from that epoch to that instant.