Tribe__Date_Utils::is_valid_date( string $date )
Validates a date string to make sure it can be used to build DateTime objects.
Contents
Parameters
- $date
-
(string) (Required) The date string that should validated.
Return
(bool) Whether the date string can be used to build DateTime objects, and is thus parse-able by functions like strtotime, or not.
Source
File: src/Tribe/Date_Utils.php
public static function is_valid_date( $date ) {
return self::build_date_object( $date, null, false ) instanceof DateTime;
}
Changelog
| Version | Description |
|---|---|
| 4.9.5 | Introduced. |