cal_days_in_month

(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)

cal_days_in_month — 주어진 연도 및 달력에 대한 한 달의 일 수를 반환합니다.


설명

cal_days_in_month(int $calendar, int $month, int $year): int

이 함수는 지정된 calendar에 대해 해당 year month의 일 수를 반환합니다.


매개변수

calendar
계산에 사용할 달력
month
선택한 캘린더의 월
year
선택한 달력의 연도

반환 값

주어진 달력에서 선택한 월의 일 길이


Examples

예제 #1 cal_days_in_month() 예제

                  
<?php
$number = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There were {$number} days in August 2003";
?>