Name

checkdate

Synopsis

bool checkdate(int month, int day, int year)

Returns true if the month, date, and year as given in the parameters are valid (Gregorian), and false if not. A date is considered valid if the year falls between 1 and 32,767 inclusive, the month is between 1 and 12 inclusive, and the day is within the number of days the specified month has (including leap years).

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.