Condition based on Day of the Week

Hi,

We would like to have a headline element display based on what day of the week it is. I found lots of date-based conditions but could not find any that trigger based on the day of the week (Sun, Mon ,Tues, etc.). Does this functionality exist?

Hello @co50,

Thanks for writing in!

You can use the string condition.

And then insert {{dc:global:date format="D"}} dynamic content:

To be familiar with the global date formats, please check this out:

Hope this helps.

Great! Thank you.

Is there a way to display the date of the next upcoming day of the week I specify? I want to use dynamic content in a headline to display the date of the next upcoming Saturday (this week that would be April 2nd, 2022, then April 9th next week, etc.). Is that possible with dynamic content?

Hello @co50,

The dynamic content only displays the dates of publishing the post, modification of the post, date of registration of the user or the current date. What you are wanting to do require more of a date manipulation which would require custom coding already. Regretfully this is beyond the scope of our support. You might want to check this out instead:

Be advised that this is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Best Regards.

I know how to do this in PHP. Your dynamic content formatting does not follow PHP’s format exactly so that’s why I was asking if your dynamic content was capable of doing this and if so, how (i.e. what is the syntax). This is exactly within the scope of support.

Hello @co50,

Our dynamic content that displays a date follows the same as the PHP date format. For example, {{dc:global:date format="D"}}, it should displays “Fri”:

Be advised that you cannot use the Date dynamic content to display advance dates. The Date dynamic content as I have mentioned previous that it will only display the dates related to the posts, pages, user or the current date.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.