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...

$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

rc255
 
rc255 replied on at Permalink Reply
rc255
Has anyone got any thoughts on this?
rc255 replied on at Permalink Reply
rc255
*bump*
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
deleted
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
deleted
rc255 replied on at Permalink Reply
rc255
Thanks ConcreteOwl, I tried that:

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
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Yeah, I will keep on digging too..
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
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...