function theme_date_display_range in Date 8
Same name and namespace in other branches
- 5.2 date/date.theme \theme_date_display_range()
- 6.2 date/date.theme \theme_date_display_range()
- 7.3 date.theme \theme_date_display_range()
- 7 date.theme \theme_date_display_range()
- 7.2 date.theme \theme_date_display_range()
Returns HTML for a date element formatted as a range.
1 theme call to theme_date_display_range()
- theme_date_display_combination in ./
date.theme - Returns HTML for a date element formatted as a Start/End combination.
File
- ./
date.theme, line 271 - Theme functions.
Code
function theme_date_display_range($variables) {
$date1 = $variables['date1'];
$date2 = $variables['date2'];
$timezone = $variables['timezone'];
$attributes_start = $variables['attributes_start'];
$attributes_end = $variables['attributes_end'];
// Wrap the result with the attributes.
return t('!start-date to !end-date', array(
'!start-date' => '<span class="date-display-start"' . new Attribute($attributes_start) . '>' . $date1 . '</span>',
'!end-date' => '<span class="date-display-end"' . new Attribute($attributes_end) . '>' . $date2 . $timezone . '</span>',
));
}