• PHP Video Tutorials

PHP - Function juliantojd()



Syntax

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

Definition and Usage

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

Parameters

Sr.No Parameter & Description
1

month(Required)

The month as a number from 1 to 12

2

day(Required)

The day as a number from 1 to 31

3

year(Required)

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 . "\n");
   
   $julian = jdtojulian($jd);
   echo($julian);
?> 

This will produce the following result −

2454390
10/3/2007
php_function_reference.htm
Advertisements