Funkce PHP cal_days_in_month().
Příklad
Získejte počet dní v měsíci pro určitý rok a kalendář:
<?php
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo "There was $d days in October 2005";
?>
Definice a použití
Funkce cal_days_in_month() vrací počet dní v měsíci pro zadaný rok a kalendář.
Syntax
cal_days_in_month(calendar,month,year);
Hodnoty parametrů
Parameter | Description |
---|---|
calendar | Required. Specifies the calendar to use. Look at the PHP Calendar Constants |
month | Required. Specifies the month in the selected calendar |
year | Required. Specifies the year in the selected calendar |
Technické údaje
Návratová hodnota: | Počet dní ve vybraném měsíci, v daném roce a kalendáři |
---|---|
Verze PHP: | 4.1+ |
❮ Reference kalendáře PHP