X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP cal_to_jd() Function

PHP Calendar Reference PHP Calendar Reference

Example

Convert 20th of June, 2007 (Gregorian calendar) to Julian Day Count:

<?php
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>

Run example »

Definition and Usage

The cal_to_jd() function converts a date in a specified calendar to Julian Day Count.


Syntax

cal_to_jd(calendar,month,day,year);

Parameter Description
calendar Required. Specifies the calendar to convert from. Must be one of the following values:
  • CAL_GREGORIAN
  • CAL_JULIAN
  • CAL_JEWISH
  • CAL_FRENCH
month Required. Specifies the month as a number
day Required. Specifies the day as a number
year Required. Specifies the year as a number

Technical Details

Return Value: Returns a Julian Day number
PHP Version: 4.1+


PHP Calendar Reference PHP Calendar Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook