• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Change Date/Time Format in Upcoming Events Module

Change Date/Time Format in Upcoming Events Module 12 years 1 day ago #22731

I had a bit of trouble with this, but I finally figured it out and thought I would share. To change the format of the data and time in the upcoming events module, use a template override for /modules/mod_rseventspro_upcoming/default.php and change the following line:
<?php echo $event->allday ? rseventsproHelper::date($event->start,rseventsproHelper::getConfig('global_date'),true) : rseventsproHelper::date($event->start,null,true); ?>

To this:
<?php if($event->allday) :
			echo rseventsproHelper::date($event->start,rseventsproHelper::getConfig('global_date'),true);
			else : 
			echo rseventsproHelper::date($event->start,'F n, Y (g:i A ') . rseventsproHelper::date($event->end,'- g:i A)');
			endif;
			?>

The format I changed it to is Month Day, Year (HH:MM AM - HH:MM PM) (eg, F n, Y (g:i A - g:i A)). But to have a different format, just change the string using the PHP Time/Date format.
The administrator has disabled public write access.

Change Date/Time Format in Upcoming Events Module 11 years 11 months ago #22812

  • houston
  • houston's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 2
Any ideas on what the format would be to change the format for this line of code used on the same file?

<?php echo $event->end;?>

On the front end the time looks like this: 2013-05-18 22:00:00

I want it to look like this: May 18, 2013 4:00 pm

Many thanks,
Houston
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!