I'm looking for a way in Views to abbreviate or shorten the date listed at the top of the block for the Calendar module. Currently it shows the full date like:

Monday, December 1

and I would like to show:

Mon, Dec 1

...as shown in the attached screenshot. Is there a setting for this in Views or does that have to be accessed via a hook? Any help is appreciated. Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rajmataj’s picture

Status: Active » Closed (works as designed)

(Answering for my own and other's benefit) This is actually related to the Date module. You can take a copy of the function that starts as function theme_date_nav_title($params) { which is found in sites/all/modules/contrib/date/date_views/theme/theme.inc (7.x-2.8) and adjust the PHP date format to suit your needs, putting the resulting code in your own template.php file. In my case, I altered this:

$format_without_year = variable_get('date_views_' . $granularity . 'format_without_year', 'l, F j');

...to be:

$format_without_year = variable_get('date_views_' . $granularity . 'format_without_year', 'D, M j');

If anyone knows of another way, please feel to mention here. Thanks.