Change date format in Calendar Weekly View

More
6 years 10 months ago #99132 by Tess
Hello-
I would like to change the way the date is displayed when clicking the "Weekly View" button from the big calendar. Currently it reads as
Sunday. 21 May, 2017 and I would like to change it to read Sunday, May 21, 2017, but I don't know what file to override to make that change.

thanks for your help

,
Tess
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago - 6 years 10 months ago #99138 by James Riley
Replied by James Riley on topic Change date format in Calendar Weekly View
This is hard-coded into /components/com_eventbooking/view/calendar/tmpl/weekly.php

Search for the line of code that reads:
Code:
echo $daysInWeek[date('w', $startWeekTime)].'. '.date('d', $startWeekTime).' '.$monthsInYear[date('n', $startWeekTime)].', '.date('Y', $startWeekTime).' - '.$daysInWeek[date('w', $endWeekTime)].'. '.date('d', $endWeekTime).' '.$monthsInYear[date('n', $endWeekTime)].', '.date('Y', $endWeekTime) ;

and replace with:
Code:
echo $daysInWeek[date('w', $startWeekTime)].', '.date('d', $startWeekTime).' '.$monthsInYear[date('n', $startWeekTime)].', '.date('Y', $startWeekTime).' - '.$daysInWeek[date('w', $endWeekTime)].', '.date('d', $endWeekTime).' '.$monthsInYear[date('n', $endWeekTime)].', '.date('Y', $endWeekTime) ;

Save the file as a template override so that this change isn't lost on update (save the file to /templates/YOUR_TEMPLATE/html/com_eventbooking/calendar/weekly.php (as per "override" Joomla documentation )

@Tuan -- this might be a candidate for either correction in the core release (a comma should be used, not a period), or should be configurable either in Configuration or Translation.

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 6 years 10 months ago by James Riley.
The following user(s) said Thank You: Tuan Pham Ngoc, Tess

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #99143 by Tess
James-
Thank you so much, that worked perfectly. I really appreciate your quick, accurate responses!

Tess

Please Log in or Create an account to join the conversation.

More
6 years 10 months ago #99151 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change date format in Calendar Weekly View
Thanks James.

Busy working on some architecture / structure changes for version 3.0.0 and will review this one later. If you ever have suggestions to improve it, please help posting issues on Events Booking repo so that we can work on it and get things improved for 3.0.0

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc