PHP cal_days_in_month()ฟังก์ชัน
ตัวอย่าง
รับจำนวนวันในหนึ่งเดือนสำหรับปีและปฏิทินที่ระบุ:
<?php
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo "There was $d days in October 2005";
?>
ความหมายและการใช้งาน
ฟังก์ชัน cal_days_in_month() คืนค่าจำนวนวันในหนึ่งเดือนสำหรับปีและปฏิทินที่ระบุ
ไวยากรณ์
cal_days_in_month(calendar,month,year);
ค่าพารามิเตอร์
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 |
รายละเอียดทางเทคนิค
คืนมูลค่า: | จำนวนวันในเดือนที่เลือกในปีและปฏิทินที่กำหนด |
---|---|
รุ่น PHP: | 4.1+ |
❮ การอ้างอิงปฏิทิน PHP