
如何列出MySQL数据库(分步代码教程)
wp_checkdate ( $month, $day, $year, $source_date )
wp_checkdate:这是一个检查日期是否有效的函数。它可以用来确保用户输入的日期是一个有效的日期,可以在WordPress中使用。
测试提供的日期是否对公历有效。
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 ); }