Search by date range

I am making a 'batch by day' view.

How do I search for just one day ?
If i use the code below I get 'two days' and if I change offset_e to 3 I get 'nothing'

    oftset_s = 3
    offset_e = 4 
    today = datetime.date.today()
    start_date = today + datetime.timedelta(days=offset_s)
    end_date  = today + datetime.timedelta(days=offset_e)
    date_range = {
        'query': (
            start_date,
            end_date,
        ),
        'range': 'min:max',
        }
    return self.context.portal_catalog(Type='Movie', start=date_range, sort_on='start')

Please reuse plone.app,querystring code for that: https://github.com/plone/plone.app.querystring/blob/6ab206c4ebe9703793d273d9071ee3042f424db1/plone/app/querystring/queryparser.py#L180

The important bits are earliestTime and latestTime.

just a quick note:

start_date < day after
end_date > today, beginning of the day

Also see:

not sure, if that helps.

thanks everyone

Did you fix you problem, if so what did you end up doing?

Yes I got it fixed, but your links also got me to looks at the events 'way of doing it' ( which makes it possible to set the dates in the url).

So now I am subclassing the Events view if I only could get 'scale' to work (I can probably get around this by constructing the image url) and adding two more fields ( hashtag and category)