CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Joomla Extensions (Moderator: lcdweb) »
  • Patch to improve appearance of end date
Pages: [1]

Author Topic: Patch to improve appearance of end date  (Read 2019 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Patch to improve appearance of end date
November 22, 2009, 01:06:29 pm
I didn't like the duplication of dates when the start date equalled the end date ...

Eg, 1/12/2009 -1/12/2009

... so I applied the following patch to print only one date if they were the same, and (if they weren't) to add a space before the end date:

Code: [Select]
--- default.php 2009-10-06 10:17:42.000000000 +1100
+++ /var/www/xxx/modules/mod_civievent/tmpl/default.php 2009-11-23 07:52:12.000000000 +1100
@@ -40,8 +40,8 @@
  $event->end_date = JHTML::_('date', $event->end_date, $display_params[dateformat], 0);
  }
 
- if ($event->end_date) {
- $eventdate = $event->start_date." –".$event->end_date;
+ if ($event->end_date && $event->end_date != $event->start_date) {
+ $eventdate = $event->start_date." – ".$event->end_date;
  } else {
  $eventdate = $event->start_date;
  }

Ken
« Last Edit: November 23, 2009, 01:14:30 pm by ken »

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Patch to improve appearance of end date
November 23, 2009, 01:15:24 pm
In my previous post, I created the diff the wrong way round. I fixed that. Sorry for any confusion caused!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Joomla Extensions (Moderator: lcdweb) »
  • Patch to improve appearance of end date

This forum was archived on 2017-11-26.