Calendar Event Date Formatting
Permalink
Hi, I have made a custom block for the Calendar Event block.
The date & time appears in this format: 9 Aug 2019, 20:00 – 21:45
but I would like to include the day and the full month as well ie:
Friday 9th August 2019, 20:00 – 21:45
I have searched everywhere for how to format this date but to no avail...
this is the only bit of code I have to work with and I cannot find anything in the dashboard to allow me to change the date format.
If you can point me in the right direction, I'd be very grateful
Thanks
The date & time appears in this format: 9 Aug 2019, 20:00 – 21:45
but I would like to include the day and the full month as well ie:
Friday 9th August 2019, 20:00 – 21:45
I have searched everywhere for how to format this date but to no avail...
$formatter->getOccurrenceDateString($occurrence)
this is the only bit of code I have to work with and I cannot find anything in the dashboard to allow me to change the date format.
If you can point me in the right direction, I'd be very grateful
Thanks
Has anyone got any thoughts on this?
*bump*
deleted
deleted
Thanks ConcreteOwl, I tried that:
and I changed the date format to 'l/j/S/F/Y' but nothing has happened :(
(I also cleared the cache)
I shall keep looking to see if I can find this type of code referenced in the calendar section
Cheers mate
public function getPHPDatePattern() { $isoFormat = Calendar::getDateFormat('full'); $result = Calendar::tryConvertIsoToPhpFormat($isoFormat); if ($result === null) { // $result = t(/*i18n: Short date format: seehttp://www.php.net/manual/en/function.date.php... */ 'n/j/Y'); $result = t(/*i18n: Short date format: seehttp://www.php.net/manual/en/function.date.php... */ 'l/j/S/F/Y'); } return $result; }
and I changed the date format to 'l/j/S/F/Y' but nothing has happened :(
(I also cleared the cache)
I shall keep looking to see if I can find this type of code referenced in the calendar section
Cheers mate
Yeah, I will keep on digging too..
What I have discovered is the calendar uses ISO 8601 format for Dates and this is very restricted in its options, basically ... No Textual Days etc.
Info at
https://www.w3.org/TR/NOTE-datetime....
The page that is responsible for dates can be found at concrete/blocks/calendar/view.php.
Further reading at
https://fullcalendar.io/docs/view-specific-options...
Info at
https://www.w3.org/TR/NOTE-datetime....
The page that is responsible for dates can be found at concrete/blocks/calendar/view.php.
Further reading at
https://fullcalendar.io/docs/view-specific-options...