days_in_month()

days_in_month([$month = 0[, $year = '']])

Parameters:
  • $month (int) – a numeric month
  • $year (int) – a numeric year
Returns:

Count of days in the specified month

Return type:

int

Returns the number of days in a given month/year. Takes leap years into account.

Example:

echo days_in_month(06, 2005);

If the second parameter is empty, the current year will be used.

Note

This function will alias the native cal_days_in_month(), if it is available.

doc_CodeIgniter
2016-10-15 16:32:14
Comments
Leave a Comment

Please login to continue.