WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp checkdate

Description

Check if the supplied date is valid for the Gregorian calendar.

Usage

wp_checkdate( $month, $day, $year, $source_date );

Parameters

$month 
(integer) Month of the year (1-12)
$day 
(integer) Day of the month (1-31)
$year 
(integer) Year
$source_date 
(string) A properly formed date such as 2008-10-24

Return

True if it is a valid Gregorian calendar date. False if not.

Examples

Notes

Applies the filter wp_checkdate to the return.

Change Log

Source File

wp_checkdate() is located in wp-includes/functions.php.

Related