Jump to content

Recommended Posts

Posted

I customize a Page template, where {datetime="$record->record_publish_date"} is used. The output is:

11. Oktober, 2021 um 19:47 

I need to remove only the time part. I use dateonly parameter for the template plugin datetime

{datetime="$record->record_publish_date" dateonly="true"}

This outputs the date like:

11.10.2021

What I need is:

11. Oktober, 2021

Can I achieve it with the datetime plugin? 

Posted (edited)

Thank you! In case someone looking for:

{expression="\IPS\DateTime::ts($record->record_publish_date)->format('j. F, Y')"}

This method does not use locales. All output is in English. https://www.php.net/manual/de/datetime.format.php

strFormat does respect locale

{expression="\IPS\DateTime::ts($record->record_publish_date)->strFormat('%e. %B, %Y')"}
Edited by Sonya*
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...