wp_checkdate( int $month, int $day, int $year, string $source_date )
Test if the supplied date is valid for the Gregorian calendar.
Description Description
Parameters Parameters
- $month
-
(int) (Required) Month number.
- $day
-
(int) (Required) Day number.
- $year
-
(int) (Required) Year number.
- $source_date
-
(string) (Required) The date to filter.
Return Return
(bool) True if valid date, false if not valid date.
Source Source
File: wp-includes/functions.php
function wp_checkdate( $month, $day, $year, $source_date ) { /** * Filters whether the given date is valid for the Gregorian calendar. * * @since 3.5.0 * * @param bool $checkdate Whether the given date is valid. * @param string $source_date Date to check. */ return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
“checkdate” link, in description section (http://wpsocket.com/wpref/function/wp_checkdate/#see-also), is broken