PHP frenchtojd() Function
In this chapter you will learn:
- Definition for PHP frenchtojd() Function
- Syntax for PHP frenchtojd() Function
- Parameter for PHP frenchtojd() Function
- Example - Convert a French Republican date to a Julian Day Count and back to a French Republican date
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
Parameter | Is Required | Description |
---|---|---|
month | Required. | Month as a number from 1 to 13 |
day | Required. | Day as a number from 1 to 30 |
year | Required. | 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/* ja va2 s . c om*/
$jd=frenchtojd(3,3,14);
echo $jd . "\n";
echo jdtofrench($jd);
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP gregoriantojd() Function
- Syntax for PHP gregoriantojd() Function
- Parameter for PHP gregoriantojd() Function
- Return value for PHP gregoriantojd() Function
- Example - Convert a Gregorian date to a Julian Day Count and back to a Gregorian date
Home » PHP Tutorial » PHP Calendar Functions