Page 1 of 1

[solved] CGCalendar - how to diplay weekday name?

Posted: Fri Aug 19, 2022 4:12 pm
by map_1961
We CGCalendar template like this:
{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
---
This displays in frontend: "Date: 14.09.2022 08:00h "

What to ad to the template to make it like this: Datum: Wednesday 14.09.2022 08:00h or better Datum: "We. 14.09.2022 08:00h" with abbreviation of the weekday name.

Thx

MAP

Re: CGCalendar - how to diplay weekday name?

Posted: Fri Aug 19, 2022 4:16 pm
by DIGI3
You can see all the date formatting options at https://www.php.net/manual/en/function.strftime.php

So in your case add %A for the full weekday or %a for abbreviated weekday. Note that the snippet you posted is the check to see if it's a full day event, you don't need to change that line. Find the line(s) that actually output the date and change those.

Re: CGCalendar - how to diplay weekday name?

Posted: Fri Aug 19, 2022 4:42 pm
by map_1961
Works perfect !!! - thx for the fast and competent replay!!!

Yours

MAP