With this function you can get the number of days that the given month has, either 28, 29, 30 or 31.
date_days_in_month(date);
Argument | Type | Description |
---|---|---|
date | Datetime | The date to use. |
days = date_days_in_month(date_current_datetime());
This would set "days" to the number of days in the current month.