• Resolved jrflojo

    (@jrflojo)


    Hello,

    I’d like to insert some spans into the output of the date but I’m unsure how to do this.

    I was using advanced custom fields for a basic events events system but I’ve decided to use this plugin now. I was using the following code to break the date down separately so I could output 27 <span>Nov</span>2013

    <span><?php
    $date = DateTime::createFromFormat('Ymd', get_field('event_date'));
    echo $date->format('d '); ?></span>
    <?php echo $date->format('M'); ?>

    I’d like to do the same using Events Manager but at the moment to output the date I’m using #_EVENTDATES which outputs 27/Nov/2013

    Any help would be greatly appreciated

    https://www.ads-software.com/plugins/events-manager/

Viewing 1 replies (of 1 total)
  • caimin_nwl

    (@caimin_nwl)

    Hi,

    I have a feeling I just answered the same question on the Pro forums, if not:

    You should be able to add the span tag under Events > Settings > Formatting > Date/Time. The trick is you need to escape with a backslash every non-date character. Something like this:

    d \<\s\p\a\n\> m \<\/\s\p\a\n\> Y

Viewing 1 replies (of 1 total)
  • The topic ‘Event Date Formatting’ is closed to new replies.