Separating list into days

Hi all

I currently have a “home feed” of events (listed from oldest to newest). I’d like to split these up into days, so the user could see Today’s Events, Tomorrow, 7th July, 8th July etc etc with a header splitting up these. For example:

Monday 5th July
Event

Yesterday
Event

Today
Event
Event

Tomorrow
Event
Event

Friday 9th July
Event

Does anyone have any advice?

@rc700

Yeah- you just have several copies of the same list of events each one filtered accordingly.

So:

Today
[(list of events) where date = today]
Yesterday
[(list of events) where date = yesterday]

etc.

If you’re feeling clever you can make the days a list too. So you would have a list of days, each of which contains a list of events filtered on that day.

1 Like

Genius! Thank you so much. I’ve been trying to get my head around this for ages!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.