Thread Starter
oleg.s
(@olegs-1)
I guess this is it: https://ww.wp.xz.cn/support/topic/loop-the-next-5-events
still wondering how to display only the time.
Hi OIeg,
Thanks for posting and sorry for the late reply – it’s the end of summer vacations and lots of work…
I added some more explanations to the wiki, that will hopefully help you:
https://github.com/ms-studio/minimalistic-event-manager/wiki/How-to-display-the-dates
See especially those sections :
– Example: display the time only
– Example: show only current and future events
Don’t hesitate to ask if you have more questions.
Thread Starter
oleg.s
(@olegs-1)
Hey, thanks for the reply.
Just a quick one – can i get the day (mon, tue, …) out of it, and in other languages as well?
Just a quick one – can i get the day (mon, tue, …) out of it, and in other languages as well?
Yes, that’s easy, this format (mon, tue…) is supported by the php date() function. “D” stands for : A textual representation of a day, three letters. The language support depends of what locales are included in the PHP version of your server…
This code example can be tweaked :
echo date( 'g:i A, D jS', $mem_date["start-unix"] );
The result would be for instance: 5:30 PM, Sat 17th.
If the language support doesn’t work, you may need to use date_i18n() instead of date(). It’s a function provided by WordPress core.
Thread Starter
oleg.s
(@olegs-1)
Yeah, found it.
$mem_event_date = mem_date_processing( get_post_meta(get_the_ID()
echo date_i18n(‘l’, $mem_event_date[“start-unix”]);