PHP Tutorial - PHP juliantojd() Function






Definition

The juliantojd() function converts a date from the Julian Calendar to a Julian Day Count.

Syntax

juliantojd(month,day,year);

Parameter

ParameterIs RequiredDescription
monthRequired.Month value as a number from 1 to 12
dayRequired.Day value as a number from 1 to 31
yearRequired.Year value as a number between -4713 and 9999

Return

Convert a Jewish date to a Julian Day Count returns a Julian Day number.





Example

Convert a Julian date to a Julian Day Count and back to a Julian date


<?php
$jd=juliantojd(6,20,2012);
echo $jd . "\n";
echo jdtojulian($jd);
?>

The code above generates the following result.