wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_checkdate › WordPress Function

Since3.5.0
已弃用n/a
wp_checkdate ( $month, $day, $year, $source_date )
参数: (4)
  • (int) $month Month number.
    Required: Yes
  • (int) $day Day number.
    Required: Yes
  • (int) $year Year number.
    Required: Yes
  • (string) $source_date The date to filter.
    Required: Yes
链接:
返回:
  • (bool) True if valid date, false if not valid date.
定义在:
文档:

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



源码

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 );
}