Funkce PHP cal_to_jd().
Příklad
Převeďte 20. června 2007 (gregoriánský kalendář) na juliánský počet dnů:
<?php
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
Definice a použití
Funkce cal_to_jd() převede datum v určeném kalendáři na Juliánský počet dnů.
Syntax
cal_to_jd(calendar,month,day,year);
Hodnoty parametrů
Parameter | Description |
---|---|
calendar | Required. Specifies the calendar to convert from. Must be one of the following values:
|
month | Required. Specifies the month as a number |
day | Required. Specifies the day as a number |
year | Required. Specifies the year as a number |
Technické údaje
Návratová hodnota: | Vrátí číslo juliánského dne |
---|---|
Verze PHP: | 4.1+ |
❮ Reference kalendáře PHP