Hi, I’m struggling with the following: I have an event list (each have a start date+time and an end date+time) and I want to use de filterBy() method to only show events that:
I might be going about this completely wrong… I’ve tried to compare them with time() but figured that echos a unix timestamp. I read in the docs that using strtime() is deprecated so that might not be the way to go… Any help is much appreciated:)
The problem is that you are expecting all conditions to be true, but you need an conditions that checks if either in the future > date('ymd'), or date is today (ie. === date(‘ymd’) and then it should not have ended yet.
In case you also want to exclude events which have “started before today” (idk, you don’t want events that have started yesterday, even if they’re still going), you might also add that as condition: