Support

Home Forums Event Espresso Premium Change date time 11:55pm to 'Midnight'

Change date time 11:55pm to 'Midnight'

Posted: November 14, 2021 at 11:12 am

Viewing 1 reply thread


joyandraenton

November 14, 2021 at 11:12 am

When the rendered time says 11:55pm, I want it to display as “Midnight”. What is the best way to do that, other than JavaScript.
screenshot:
https://ibb.co/ZH0K7wr


Tony

  • Support Staff

November 15, 2021 at 5:42 am

Hi there,

I think in this case the safest option will be to use the filter within the function that outputs the above to replace the ’11:55 pm’ string within the output using str_replace().

The HTML about to be output above is passed through a filter HERE.

Viewing 1 reply thread

The support post ‘Change date time 11:55pm to 'Midnight'’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso