cal_days_in_month
Returns the number of days in a month for the specified year and calendar.
cal_days_in_month()
function returns the number of days in a month for the specified year and calendar.
Get the days in a month based on the specified year and calendar:
<?php $d = cal_days_in_month ( CAL_GREGORIAN , 2 , 2016 ) ; echo "There are $d days in February 2016." ; ?>
Run the instance
cal_days_in_month ( calendar , month , year ) ;
parameter | describe |
---|---|
calendar | Required. Specify the calendar to be used. See PHP Calendar Constants . |
month | Required. Specify the month in the selected calendar. |
year | Required. Specify the year in the selected calendar. |