Tribe__Date_Utils::is_valid_date( string $date )

Validates a date string to make sure it can be used to build DateTime objects.


Parameters

$date

(string) (Required) The date string that should validated.


Top ↑

Return

(bool) Whether the date string can be used to build DateTime objects, and is thus parse-able by functions like strtotime, or not.


Top ↑

Source

File: src/Tribe/Date_Utils.php

		public static function is_valid_date( $date ) {
			return self::build_date_object( $date, null, false ) instanceof DateTime;
		}

Top ↑

Changelog

Changelog
Version Description
4.9.5 Introduced.