Support

Home Forums Event Espresso Premium PHP: conditionally display $end_date if it's different than $start_date

PHP: conditionally display $end_date if it's different than $start_date

Posted: December 19, 2013 at 11:34 am

Viewing 3 reply threads


artsguild

December 19, 2013 at 11:34 am

I think it’s silly to say on a event
Date: Dec 1, 2014 – Dec 1, 2014
I’d rather only give the $end_date if it’s different than the $start_date.

Any pointers would be greatly appreciated. Thanks!


<?php // I'd like to NOT display the end date if it's the same as start_date
if( event_date_display($start_date) != event_date_display($end_date){
echo event_date_display($end_date, get_option('date_format'));
}
?>

  • This topic was modified 10 years, 11 months ago by artsguild.


Sidney Harrell

December 19, 2013 at 1:03 pm

It looks like that is already the case on the registration page display on the latest version. Where are you seeing that and what version of EE are you using?


artsguild

December 19, 2013 at 6:39 pm

Thanks! I’m working in the event_list_display.php circa 3.1.36.1.P
And in the ‘table view’.

I’ll have a look at the registration_page_display.php
for the example.


Tony

  • Support Staff

December 23, 2013 at 1:42 am

Hi artsguild,

Just wondering if you found the example within registration_page_display.php and were able to copy it over?

Viewing 3 reply threads

The support post ‘PHP: conditionally display $end_date if it's different than $start_date’ 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