1

Good day!

I display the day of the week on the site {{ now|date("l") }}

How to change for example Monday to Mondays (on Mondays)?

Thanks in advance :)

1
  • 2
    Are you asking how to output the day of the week as plural? Commented Jan 18, 2020 at 17:31

2 Answers 2

2

It looks like you're asking how to add a letter 's' to the day. So how about using

{{ now|date("l") }}s
0

You'd use the defaultWeekStartDay setting in your config/general.php -> https://docs.craftcms.com/v3/config/config-settings.html#defaultweekstartday

3
  • Please tell me exactly how you can change the example: on Wednesdays using this setting?
    – paveell
    Commented Jan 18, 2020 at 14:32
  • Sorry, I completely misread your question. It sounds like you're asking for how to display the days in plural form? Commented Jan 18, 2020 at 21:45
  • yes: on Wednesdays, Thursdays, Saturdays, etc.
    – paveell
    Commented Jan 19, 2020 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.