frenchtojd(): The julian day for the given french revolution date as an integer.

Convert a French Republican date to a Julian Day

frenchtojd() converts a French Republican Calendar date into a Julian Day count.

$jd = frenchtojd(1, 1, 10);
echo $jd;

Current example first; the detailed examples and demos below are retained for additional learning and comparison.

<?Php
echo frenchtojd(12,22,12); // Output is 2380209
echo "<br>";
echo frenchtojd(13,22,2); // Output is 2376586
echo "<br>";
echo frenchtojd(14,22,3); // Output is 0
echo "<br>";
echo frenchtojd(13,22,3); // Output is 2376951
?>
Syntax
 int frenchtojd ( int $month , int $day , int $year )
ParameterDESCRIPTION
$yearRequired : Year between 1 to 14
$dayRequired : between 1 to 30
$monthRequired : Number from 1 to 13

Example 1: Converting French Republican Date to Julian Day Number

This example demonstrates how to convert a French Republican calendar date into a Julian Day Number using FrenchToJD().

$jd = FrenchToJD(2, 7, 3);  // Converts 7th day of 2nd month in year 3
echo "Julian Day Number: " . $jd;
Output:
Julian Day Number: 2376606
---

Example 2: Using FrenchToJD() and cal_from_jd() Together

This example converts a French Republican date to a Julian Day Number and then back to the Gregorian calendar.

$jd = FrenchToJD(2, 7, 3);  // 7th day of 2nd month in year 3
$gregorianDate = cal_from_jd($jd, CAL_GREGORIAN);
print_r($gregorianDate);
Output:
Array ( [date] => 10/28/1794 [month] => 10 [day] => 28 [year] => 1794 [dow] => 2
 [abbrevdayname] => Tue [dayname] => Tuesday [abbrevmonth] => Oct [monthname] => October )


Information about available Calendars
Calendar Functions


Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer