You are here

function date_is_date in Date 7.2

Same name and namespace in other branches
  1. 7.3 date_api/date_api.module \date_is_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.

6 calls to date_is_date()
date_combo_validate in ./date_elements.inc
Validate and update a combo element.
date_popup_element_value_callback in date_popup/date_popup.module
Element value callback for date_popup element.
date_popup_process_date_part in date_popup/date_popup.module
Process the date portion of the element.
date_select_element_value_callback in date_api/date_api_elements.inc
Element value callback for date_select element.
date_text_element_value_callback in date_api/date_api_elements.inc
Element value callback for date_text element.

... See full list

File

date_api/date_api.module, line 3038
This module will make the date API available to other modules.

Code

function date_is_date($date) {
  if (empty($date) || !is_object($date) || !empty($date->errors)) {
    return FALSE;
  }
  return TRUE;
}