Example 1 — Gregorian vs Julian Dates
Convert the same Julian Day into a Julian calendar date and compare with the Gregorian one.
<?php
echo jdtogregorian(2451545), PHP_EOL;
echo jdtojulian(2451545), PHP_EOL;
$jd = gregoriantojd(1, 1, 2024);
echo jdtogregorian($jd), PHP_EOL;
echo jdtojulian($jd), PHP_EOL; How It Works
- Julian Day 2451545 is January 1, 2000 in the Gregorian calendar.
- In the Julian calendar the same day is December 19, 1999.
- The same 13-day gap shows for January 1, 2024, which is December 19, 2023 in the Julian calendar.
- Only the label changes, the day itself is the same.

