Example 1 — Convert to French Dates
Convert Julian Days from the French Revolution era into French Republican dates.
<?php
echo jdtofrench(2375840), PHP_EOL;
echo jdtofrench(2376205), PHP_EOL;
echo jdtofrench(2378444), PHP_EOL;
echo jdtofrench(gregoriantojd(9, 22, 1793)), PHP_EOL; How It Works
- 2375840 is the first valid day, so it returns 1/1/1.
- 365 days later (2376205) is the start of year 2, which is 1/1/2.
- The Julian Day 2378444 is 18 Brumaire (month 2) of year 8, returned as 2/18/8.
- September 22, 1793 in the Gregorian calendar is also the start of year 2.

