Support

Home Forums Event Espresso Premium Show shorter version of weekday (e.g. Wed instead of Wednesday) in the table

Show shorter version of weekday (e.g. Wed instead of Wednesday) in the table

Posted: December 11, 2016 at 12:41 pm


Oguzhan Altun

December 11, 2016 at 12:41 pm

Hello,

This is related to the changes we did to show the weekday in my events table:
https://eventespresso.com/topic/after-update-the-weekday-doesnt-show-up/

As the table is a bit too long for mobile browsers, I would like to show the short version of the weekday instead of the full. e.g. Wed instead of Wednesday, Sun instead of Sunday etc.

Is this possible via small change in the code? If yes, how?


Tony

  • Support Staff

December 13, 2016 at 3:32 am

Hi there,

You need to pass the correct date format to be used within the call to espresso_event_date_range()

For day of the week you currently use:

espresso_event_date_range( 'l', ' ', 'l', ' ', $event->ID() );

the first paramater in that function is the date format (currently set to ‘l’)

If you look here: http://php.net/manual/en/function.date.php

You’ll find the ‘l’ represents a ‘A full textual representation of the day of the week’

You need to us ‘D’ which represents ‘A textual representation of a day, three letters’.

espresso_event_date_range( 'D', ' ', 'l', ' ', $event->ID() );


Oguzhan Altun

December 13, 2016 at 7:31 am

Thank you Tony. It worked, just a little bit differently, had to put the D to replace the second ‘l” as well.
espresso_event_date_range( 'D', ' ', 'D', ' ', $event->ID() );


Tony

  • Support Staff

December 13, 2016 at 7:45 am

Ah yeah, that makes sense.

That second l was setting the ‘singe_date_format’ so you’d need to set it there.


Oguzhan Altun

December 13, 2016 at 10:26 am

Hi, sorry one more question.. Is it possible to have these dates output in french for the french version of the page?


Oguzhan Altun

December 13, 2016 at 10:27 am

sorry, you can ignore this question, for some reason, it already does!!!

The support post ‘Show shorter version of weekday (e.g. Wed instead of Wednesday) in the table’ 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