Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

frenchtojd()

Example

Convert a French Republican date to a Julian Day Count and then back to a French Republican date.

<?php
$jd=frenchtojd(3,3,14);
echo $jd . “<br>”;
echo jdtofrench($jd);
?>

Definition and Usage

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

Tip: The French Republican Calendar, introduced during the French Revolution, was used by the French government for approximately twelve years, from late 1793. This function only handles dates from years 1 through 14 (Gregorian dates September 22, 1792 – September 22, 1806).

 

Tip: Use the jdtofrench() function to convert a Julian Day Count back to a French Republican date.

Syntax

frenchtojd(month,day,year);

Parameter Values

 

Parameter

Description

month

Required. Specifies the month as a number ranging from 1 to 13.

day

Required. Specifies the day as a number between 1 and 30.

year

Required. Specifies the year as a number from 1 to 14.

Technical Details

Return Value:

Returns a Julian Day number

PHP Version:

4+