You are here

function theme_date_display_single in Date 7.2

Same name and namespace in other branches
  1. 8 date.theme \theme_date_display_single()
  2. 5.2 date/date.theme \theme_date_display_single()
  3. 6.2 date/date.theme \theme_date_display_single()
  4. 7.3 date.theme \theme_date_display_single()
  5. 7 date.theme \theme_date_display_single()

Returns HTML for a date element formatted as a single date.

1 theme call to theme_date_display_single()
theme_date_display_combination in ./date.theme
Returns HTML for a date element formatted as a Start/End combination.

File

./date.theme, line 298
Theme functions.

Code

function theme_date_display_single($variables) {
  $date = $variables['date'];
  $timezone = $variables['timezone'];
  $attributes = $variables['attributes'];
  $show_remaining_days = isset($variables['show_remaining_days']) ? $variables['show_remaining_days'] : '';

  // Wrap the result with the attributes.
  $output = '<span class="date-display-single"' . drupal_attributes($attributes) . '>' . $date . $timezone . '</span>';
  if (!empty($variables['add_microdata'])) {
    $output .= '<meta' . drupal_attributes($variables['microdata']['value']['#attributes']) . '/>';
  }

  // Add remaining message and return.
  return $output . $show_remaining_days;
}