Hi, with my events-teaser template I'd like to achieve the following output for an event date:
Fri 05 Jun 2015 - Sat 06 Jun 2015
I've got the following code so far, but:
• the day name is output in full rather than a 3-letter abbreviation – how can this be done?
• are there any improvements / simplifications that can be made to the code?
Many thanks for any help. I'm just not that knowledgeable with PHP.
PHP Code:
<?php if ($this->header): ?>
<?php if ($this->firstDay): ?><span class="start-date"><?php echo $this->firstDay; ?>
<?php endif; ?>
<?php echo $this->firstDate; ?><?php if ($this->endDate): ?></span>
- <span class="end-date"><?php echo $GLOBALS['TL_LANG']['DAYS_SHORT'][Date('w', $this->end)] . " " . Date('d M Y', $this->end); ?></span>
<?php endif; ?>
<?php endif; ?>
Bookmarks