Tag Archives: months

Event List Parameters, number of events, days, months, years

In the list type settings, and as shortcode parameters, you can set the maximum number of events and the maximum number of days or months that the plugin will attempt to list.  It also uses these to limit the recurring events it has to generate.

maximum events and number of days, or months
maximum events and number of days, or months

It is important to set a balance between number of days/months and number of events, particularly if you have recurring events and in particular for those people using ics files.    An event, especially a recurring can be made up of multiple VEVENT definitions, additional definitions for each excluded date, or modified instance.  So for each recurring event, the plugin has to

  • generate the possible instances, hold them all in memory
  • check for any modifications, exclusions etc and apply those to the instances, before it can start limiting.

Modifications of instances can change an instance date and time – pushing it out of the desired time range or WORSE, pulling an instance that is currently out of range, INTO the time range.

Try to balance the two parameters: the time period and the number of events based on your knowledge of the types of events and their frequency.

For example:   If you specify 10 events and 1000 days, the recurring events have to be generated out to 1000 days and all held in memory, until all events generated and modifications applied, and then the number can be cut back to 10.

As a guideline, If you want to show 5 events and usually they’d be in the next two months, then maybe 90-120 days would be suitable.

Note also that there is a difference between how hours, days, months thresholds are treated.

  • hours start from current hour
  • days start from current day
  • months start from current month

So if you say months=1 and the list is running on the last few days of the month, you will not see many of ‘future’ events ie: next months day. Bette to perhaps either use: days=30 or months=2,