def _make_zcatalog_query(start, stop, kw):
    """Takes a IEventProvider query and makes it a ZCaralog query"""

    if 'title' in kw:
        # The catalog calls this property "Title" with a
        # capital T.
        kw['Title'] = kw['title']
        del kw['title']
    # Note how we assign the stop to the start and the start to the end
    # This is confusing, but correct. We want everything that that has a
    # start date before the stop time OR an end date after the start time.
    if stop is not None:
        kw['start']={'query': dt2DT(stop), 'range': 'max'}
    if start is not None:
        kw['end']={'query': dt2DT(start), 'range': 'min'}
    return kw
Esempio n. 2
0
 def rrule_end(self):
     rrule = self.rrule()
     if rrule is not None and rrule._until:
         return self.context.toLocalizedTime(dt2DT(rrule._until), long_format=0)
     return ''