You are here

function theme_webform_display_date in Webform 6.3

Same name and namespace in other branches
  1. 7.4 components/date.inc \theme_webform_display_date()
  2. 7.3 components/date.inc \theme_webform_display_date()

Format the text output for this component.

1 theme call to theme_webform_display_date()
_webform_display_date in components/date.inc
Implements _webform_display_component().

File

components/date.inc, line 352
Webform module date component.

Code

function theme_webform_display_date($element) {
  $output = ' ';
  if ($element['#value']['year'] && $element['#value']['month'] && $element['#value']['day']) {
    $timestamp = webform_strtotime($element['#value']['month'] . '/' . $element['#value']['day'] . '/' . $element['#value']['year']);
    $format = webform_date_format('medium');
    $output = format_date($timestamp, 'custom', $format, 0);
  }
  return $output;
}