DATE RANGES - hiding range separator (dash)

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 12, 2018   (RSS)

By Toledoh - April 12, 2018

Could you just move the dash into the "If"

<?php echo date("M j", strtotime($record['start_date'])) ?>

<?php if ($record['end_date'] && $record['end_date']!=0): ?>
- <?php echo date("M j", strtotime($record['end_date'])) ?>
<?php endif ?>

<?php echo date(",  Y", strtotime($record['start_date'])) ?>

Cheers,

Tim (toledoh.com.au)

By csdesign - April 12, 2018

Wow, so obvious now... that worked perfectly... this does not bode well for the rest of my day ;)  thanks so much Tim! 

By Toledoh - April 12, 2018

... been there :)

Cheers,

Tim (toledoh.com.au)

By csdesign - April 12, 2018

ha.. geez. Obviously I've either had too much or not enough caffeine