Copyright © tutorialspoint.com

PHP Function juliantojd()

previous
Advertisements

Syntax

juliantojd ( $month, $day, $year );

Definition and Usage

Converts a Julian Calendar date to Julian Day Count. Valid Range for Julian Calendar 4713 B.C. to 9999 A.D.

Paramters

ParameterDescription
monthRequired. The month as a number from 1 to 12
dayRequired. The day as a number from 1 to 31
yearRequired. The year as a number between -4713 and 9999

Return Value

The julian day for the given julian date as an integer.

Example

Try out following example:

<?php
$jd = juliantojd(10,3,2007);
echo($jd . "<br />");

$julian = jdtojulian($jd);
echo($julian);
?> 

This will produce following result:

2454390
10/3/2007
previous

Copyright © tutorialspoint.com