PHP - Function call_to_jd()


Advertisements


Syntax

cal_to_jd ( $calendar, $month, $day, $year );

Definition and Usage

This calculates the Julian day count for a date in the specified calendar.

Parameters

Sr.No Parameter & Description
1

calendar

Required. Calendar to use for calculation. The following calendar values can be used −

  • CAL_GREGORIAN
  • CAL_JULIAN
  • CAL_JEWISH
  • CAL_FRENCH
2

month

Required. Month in the selected calendar

3

year

Required. Day in the selected calendar

4

year

Required. Year in the selected calendar

Return Value

The length in days of the selected month in the given calendar.

Example

Try out following example −

<?php
   $d = cal_to_jd(CAL_GREGORIAN,11,03,2007);
   
   echo $d;
?> 

This will produce the following result −

2454408

php_function_reference.htm

Advertisements