Commit bd004521 authored by Tyler Struyk's avatar Tyler Struyk
Browse files

Code standards

parent acf1ea80
......@@ -273,10 +273,10 @@ function uw_ct_event_views_pre_render(&$view) {
// If we dont have that format it is just YYYY.
if (preg_match('/[0-9]{4}-[0-9]{1,2}/', $date)) {
$display_date = date("F Y", strtotime($date));
$view->build_info['title'] = t('Events - ' . $display_date);
$view->build_info['title'] = t('Events - @display_date', array('@display_date' => $display_date));
}
else {
$view->build_info['title'] = t('Events - ' . $date);
$view->build_info['title'] = t('Events - @date', array('@date' => $date));
}
}
}
......@@ -584,7 +584,11 @@ function uw_ct_event_block_view($delta = '') {
// Same month and year, different day. "Nov. 24-26, 2005".
if (date('m', $date_start) === date('m', $date_end)) {
if ($language->language === 'en') {
$date_formatted = t(uw_month_name_short(date('n', $date_start))) . ' ' . date('j', $date_start) . ' to ' . date('j, Y', $date_end);
$date_formatted = t('@month @date_start to @date_end', array(
'@month' => uw_month_name_short(date('n', $date_start)),
'@date_start' => date('j', $date_start),
'@date_end' => date('j, Y', $date_end),
));
}
else {
$date_formatted = format_date($date_start, 'custom', t('M', [], ['context' => 'php date format']))
......@@ -617,7 +621,12 @@ function uw_ct_event_block_view($delta = '') {
// Fully different dates."Nov. 24, 2005 to Jan. 2, 2006".
else {
if ($language->language === 'en') {
$date_formatted = t(uw_month_name_short(date('n', $date_start))) . ' ' . date('j, Y', $date_start) . ' to ' . t(uw_month_name_short(date('n', $date_end))) . ' ' . date('j, Y', $date_end);
$date_formatted = t('@month_start @date_start to @month_end @date_end', array(
'@month_start' => uw_month_name_short(date('n', $date_start)),
'@date_start' => date('j, Y', $date_start),
'@month_end' => uw_month_name_short(date('n', $date_end)),
'date_end' => date('j, Y', $date_end),
));
}
else {
$date_formatted = format_date($date_start, 'custom', t('M j, Y', [], ['context' => 'php date format']))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment