You are here

function theme_date_views_browser_period_label in Date 5

Same name and namespace in other branches
  1. 5.2 date/date.theme \theme_date_views_browser_period_label()
  2. 6 date/date.theme \theme_date_views_browser_period_label()

Theme for the current period label name

1 theme call to theme_date_views_browser_period_label()
date_views_browser_period_label in ./date_views.inc
Return label for current date range

File

./date_views.inc, line 816

Code

function theme_date_views_browser_period_label($period, $date) {
  include_once drupal_get_path('module', 'date_api') . '/date.inc';

  // use the m/d/Y part of the preferred short date format
  if ($period != 'hour') {
    $format = array_shift(explode(' ', variable_get('date_format_short', 'm/d/Y - H:i')));
  }
  else {
    $format = str_replace(':i', '', variable_get('date_format_short', 'm/d/Y - H:i'));
  }
  return t('%period of %date', array(
    '%period' => ucwords($period),
    '%date' => date_gmdate($format, $date),
  ));
}