You are here

function date_show_value in Date 5

A function to display the database value for the date object

Parameters

$date - the date object: @param $format - DATE_UNIX or DATE_ISO, the type of value to display @param $type - 'db' or 'local', the date value to display

2 calls to date_show_value()
date_text_input in ./date.inc
Text date input form, with optional jscalendar popup
date_widget in ./date.module
Implementation of hook_widget().

File

./date.inc, line 421
Date/time API functions

Code

function date_show_value($date, $type = 'db', $format = DATE_ISO) {
  if ($format == DATE_UNIX) {
    return $date->{$type}->timestamp;
  }
  else {
    return $date->{$type}->iso;
  }
}