1 date.theme.inc theme_date_display_remaining($variables)

Returns HTML for remaining message.

Related topics

File

core/modules/date/date.theme.inc, line 457
Theme and preprocess functions for output by Date module.

Code

function theme_date_display_remaining($variables) {
  $remaining_days = $variables['remaining_days'];
  if ($remaining_days) {
    $show_remaining_text = format_plural($remaining_days, '1 day remaining to event.', '@count days remaining to event.');
  }
  else {
    $show_remaining_text = t('Less then 1 day remaining to event.');
  }

  return '<div class="date-display-remaining"><span class="date-display-remaining">' . $show_remaining_text . '</span></div>';
}