How do you sort recurring event

Lets say I want to show the next 6 events.

'Normally', I would sort on 'start' end check if 'it has ended before today'.

But if I have recurring events (lets say it goes on every friday for 5 weeks).

How should I sort / query for this?

(if you have suggestions on how to 'present them', please do (for example, if they are sorted on date, and one event started yesterday and will 'recur' in 6 days, should this list first (on start), or on 'next friday (which might not show it amongst the 6 events I have in the view)

1 Like

if you are using simply query the catalog as you would do for usual events.
the result set will only contain one entry for a recurring event.

on the brains then call (i think this is the part you are missing)
typically you'll ask for EventAccessors and provide a start and enddate and sort on 'start'

result = []
for acc in expand_events(brains,
        end=now + timedelta(EVENT_EXPAND_DAYS),
    count += 1
    if count == 6:

reading on EventAccessors and expand_events in helped me a lot to understand the concept