You are here

function theme_webform_display_date in Webform 7.4

Same name and namespace in other branches
  1. 6.3 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 506
Webform module date component.

Code

function theme_webform_display_date($variables) {
  $element = $variables['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(NULL, $element['#exclude']);
    $output = format_date($timestamp, 'custom', $format, 'UTC');
  }
  return $output;
}