1 date.inc | date_is_date($date) |
Determines if a date object is valid.
Parameters
object $date: The date object to check.
Return value
bool: TRUE if the date is a valid date object, FALSE otherwise.
File
- core/
includes/ date.inc, line 1643 - Date API functions.
Code
function date_is_date($date) {
if (empty($date) || !is_object($date) || !empty($date->errors)) {
return FALSE;
}
return TRUE;
}