Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP cal_to_jd() Function

PHP cal_to_jd() Function

PHP Calendar Reference Manual PHP Calendar Reference Manual

Example

Convert June 20, 2007 (Gregorian calendar) to a Julian day count:

Run Example »


Definition and Usage

The cal_to_jd() function converts a date in a specified calendar to a Julian day count.

Syntax

cal_to_jd(

calendar,month,day,year);

Parameters Description
calendar Required. Specifies the calendar to use. Must be one of the following constants:
  • CAL_GREGORIAN
  • CAL_JULIAN
  • CAL_JEWISH
  • CAL_FRENCH
  • | | *month* | Required. A number specifying the month. | | *day* | Required. A number specifying the day. | | *year* | Required. A number specifying the year. |

    Technical Details

    Return Value: Returns the Julian day number.
    PHP Version: 4.1+

    PHP Calendar Reference Manual PHP Calendar Reference Manual