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

<?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
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



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-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer