[solved] CGCalendar - how to diplay weekday name?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
map_1961
Power Poster
Power Poster
Posts: 387
Joined: Fri Apr 20, 2007 7:26 pm
Location: Ruhrstadt

[solved] CGCalendar - how to diplay weekday name?

Post 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
Last edited by map_1961 on Fri Aug 19, 2022 4:42 pm, edited 1 time in total.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGCalendar - how to diplay weekday name?

Post 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.
Not getting the answer you need? CMSMS support options
User avatar
map_1961
Power Poster
Power Poster
Posts: 387
Joined: Fri Apr 20, 2007 7:26 pm
Location: Ruhrstadt

Re: CGCalendar - how to diplay weekday name?

Post by map_1961 »

Works perfect !!! - thx for the fast and competent replay!!!

Yours

MAP
Post Reply

Return to “Modules/Add-Ons”