Hello,
I have the latest events listed in first page using modx evolution. I want that after 00:00 past events would automaticly be hidden.
I’m using this call:
[!Ditto? &startID=`29` &showPublishedOnly=`0` &tpl=`latest` &summarize=`5` &dateSource=`TVDATE` &orderBy=`TVDATE ASC` &filter=`TVDATE,@EVAL return strtotime(’0 day’);,6` !]
TVDATE widget date picker. This call shows me all future events, but showing none of this day events. What should I change in order to show latest posts from today? Tried to change from ’0 day’, to ’-1 day’ but getting not only future and today but also one day past events.
Thanks for your help!
You should try with
@EVAL return strtotime(’today’);
it will return Unix timestamp for midnight of the current day thus giving you the correct threshold for filtering.
Super:) Thank you very much. Now working perfectly!