A Julian day number identifies a day by counting elapsed days since noon on January 1, 4713 BCE, in the Gregorian calendar. Values are whole at noon; fractional values represent times between noons. Adding or subtracting days then becomes simple arithmetic. section 5.3.2
Use the term carefully:
- Do not confuse Julian day numbers with the Julian calendar or Julian dates such as 2024-001. section 5.3.2
- Convert between Julian numbers and Gregorian year-month-day values with dedicated algorithms. section 5.3.2
- Keep the number private inside Date when it serves as an implementation detail. section 5.3.2
Date arithmetic
A Date object can calculate date2.days_from(date1), add the resulting count to date1, and recover date2. The tester reports 578 days between September 2, 2025 and April 3, 2027; Julian day number 2,440,000 corresponds to May 23, 1968.

