PHP Tutorial - PHP frenchtojd() Function






Definition

The frenchtojd() function converts a date from the French Republican Calendar to a Julian Day Count.

Syntax

PHP frenchtojd() Function has the following syntax.

frenchtojd(month,day,year);

Parameter

ParameterIs RequiredDescription
monthRequired.Month as a number from 1 to 13
dayRequired.Day as a number from 1 to 30
yearRequired.Year as a number from 1 to 14

Example

Convert a French Republican date to a Julian Day Count and back to a French Republican date:


<?php
$jd=frenchtojd(3,3,14);
echo $jd . "\n";
echo jdtofrench($jd);
?>

The code above generates the following result.