Example 1 — Start of the Republican Calendar
Convert the first day of year 1 and year 2, then show them as normal Gregorian dates.
<?php
$day1 = frenchtojd(1, 1, 1);
$day2 = frenchtojd(1, 1, 2);
echo $day1, PHP_EOL;
echo jdtogregorian($day1), PHP_EOL;
echo $day2 - $day1, PHP_EOL;
echo jdtogregorian($day2), PHP_EOL; How It Works
- frenchtojd(1, 1, 1) is the first day of the calendar, number 2375840.
- jdtogregorian() shows that this day is September 22, 1792.
- Subtracting the two Julian Days shows that French year 1 had 365 days.
- Year 2 starts exactly one year later, on September 22, 1793.

