PHP cal_days_in_month() Fungsi
Contoh
Dapatkan jumlah hari dalam sebulan untuk tahun dan kalender tertentu:
<?php
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo "There was $d days in October 2005";
?>
Definisi dan Penggunaan
Fungsi cal_days_in_month() mengembalikan jumlah hari dalam sebulan untuk tahun dan kalender tertentu.
Sintaksis
cal_days_in_month(calendar,month,year);
Nilai Parameter
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 |
Detail Teknis
Nilai Kembali: | Jumlah hari dalam bulan yang dipilih, pada tahun dan kalender tertentu |
---|---|
Versi PHP: | 4.1+ |
Referensi Kalender PHP