• Referring to a similar question, I have a follow-up question about this shortcode. How are upcoming events defined? What are the conditions for events to be displayed by this shortcode?

    The reason for my question is that the results of events in the near future appear unpredictable, i.e., the same date as today’s date. During today’s date, events can either have passed, be ongoing, or lie ahead in time. The first category should not be displayed if we consider the word “upcoming.” The second is questionable whether it should be displayed since it has already started, but the third should definitely be displayed. The number of events displayed should be consistently equal to the value at “after,” or perhaps there is some more logical parameter, such as a “counts.”

    As it looks now, the shortcode displays all events with the same date as today’s date, utterly independent of time. It shows all events on today’s date from “00:01 to 23:59” independently of the number at “after,” and it displays a couple of events after today’s date.

    Question: Is the number at “after” only referring to days, not the number of events?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    The Upcoming Events widget has a lot of settings, and the specific depend on what you’ve configured. That includes a setting to toggle between whether ‘after’ refers to days or to events – so what are the actual settings you’re using?

    Thread Starter pilotspelman

    (@pilotspelman)

    I understand (maybe?) that the widget and the shortcode are based on the same underlying code, but now it was the shortcode I was asking about.

    I think I understand the logic now, but feel free to correct me if I have come to the wrong conclusions. Using the shortcode below as an example, one, two, or no events are listed depending on the start time of the events.

    [my_calendar_upcoming before="0" after="1" type="event"]

    If the start time for all events in the calendar has been passed by 60 minutes or more, no event is listed.

    If there are several events with a start time tomorrow or later, only one event is listed, namely the one closest in time.

    Two events are listed if there are one or more events with today’s date at the same time, and whose start time has not been passed by 60 minutes or more.

    An event whose start time has been passed by 60 minutes or more is not listed, completely independent of whether the end time has been passed. An event can, therefore, be listed even though the end time has passed as long as the start time has not been passed by 60 minutes or more. Vice versa, an event whose start time has been passed by 60 minutes or more but where there are still four hours left until the end time will not be listed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.