WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Hiding end-date in event list (5 posts)

  1. admin@spark451.com
    Member
    Posted 2 years ago #

    Hi,

    My event list currently lists event dates for multi-day events as something like:

    Fri 6/29 - Sat 6/30
    9:00pm - 1:00am

    Is there a way to hide or remove the end-date? To make it look like:

    Fri 6/29
    9:00pm - 1:00am

    I can't seem to find an option for this in settings. Thanks for any help.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 2 years ago #

    Hi,

    For date format - http://www.php.net/manual/en/function.date.php

    e.g.

    This format #_{d-m-Y} #@_{- d-m-Y} will do the following

    if start and end date is the same it will show => 25-06-2012

    if not => 25-06-2012 - 29-06-2012

  3. admin@spark451.com
    Member
    Posted 2 years ago #

    Right, I tried and it does indeed show the dates with brackets.

    However, when I just put #_{d-m-Y} in without #@_{- d-m-Y}, it still shows the end date for multi-day events (e.g. the start and end dates are different). The single day events are fine, but I'm just wondering if it's at all possible to only show the start date, and not the end date, on an event that goes beyond midnight...

    Thanks again.

  4. Daedalon
    Member
    Posted 2 years ago #

    I believe this requires the developers to add two new placeholders:

    #_EVENTSTARTDATE
    #_EVENTENDDATE

    For times, there already are placeholders for both separately and together.

  5. Daedalon
    Member
    Posted 2 years ago #

    After a bit of thinking it would be beneficial to have these placeholders take formatting attributes. A use case that came to mind is "25.-26.8.2012" or "25.8.-14.9.2012". Namely, this would call for attributes such as these two: #_EVENTSTARTDATE{noduplicatemonth,noduplicateyear}. For end date just one overall duplicateness attribute might be the only thing needed: #_EVENTENDDATE{noduplicatedate}. This works for some situations, but does not yet encompass them all.

    To support all situations I was able to think of, those three attributes should all be added also to #_EVENTDATES, so that #_EVENTDATES{noduplicatemonth,noduplicateyear,noduplicatedate} would display all of the following correctly with that single, powerful, syntax.

    Event that starts and ends on...

    1. the same day is displayed as 25.8.2012.
    2. different dates of the same month is displayed as 25.-26.8.2012.
    3. different months of the same year is displayed as 25.8.-14.9.2012.
    4. different years is displayed exactly as so before, eg. 25.8.2012-1.1.2013.

    What happens in all four explained:

    1. noduplicatedate removes the ending date completely and stops parsing for the other attributes.
    2. Because noduplicatedate did not take effect, both noduplicatemonth and noduplicateyear were parsed and came into effect.
    3. Same, but only noduplicateyear came into effect.
    4. No attributes took effect.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic