function gregorian2FrenchDateArray($m, $d, $y) { $julian_date = gregoriantojd($m, $d, $y); $french = jdtofrench($julian_date); if ($french == "0/0/0") { return ""; } $arD = split("/", $french); // get the month name $monthname = FrenchMonthNames($arD[0]); /* convert the year number to roman digits (as most historians do and documents of the time did */ $stryear = decrom($arD[2]); return array($monthname, $arD[1], $stryear); }
<?php echo jdtofrench(0) . "\n"; echo jdtofrench(2375840) . "\n"; echo jdtofrench(2375850) . "\n"; echo jdtofrench(2375940) . "\n"; echo jdtofrench(2376345) . "\n"; echo jdtofrench(2385940) . "\n";