PHP 8.5.0 Beta 1 available for testing

Voting

: nine minus zero?
(Example: nine)

The Note You're Voting On

pieterc dot depraetere at ugent dot be
15 years ago
If you want to convert a date later than September 22nd 1806, you could use this function. It's a bit crude and due to the fact the original function terminates in the middle of 1806, it uses 1805 as it's 'terminus post quem'.
<?php
function extended_jdtofrench ($juliandate) {
if (
$juliandate > 2380945) {
// jdtofrench () only accepts dates until september 1806
$gregorian_date = jdtogregorian ($juliandate);
$temp = explode ('/', $gregorian_date);
$year = $temp[2];
$juliandate = gregoriantojd ($temp[0], $temp[1], 1805);
$republican_date = jdtofrench ($juliandate);
$republican_date = explode ('/', $republican_date);
$diff = $year - 1805;
$republican_date[2] = $republican_date[2] + $diff;
} else {
$republican_date = jdtofrench ($juliandate);
}
return
$republican_date;
}
?>

<< Back to user notes page

To Top