Zope 2 date index with support for recurring events.
A Zope 2 catalog index with support for indexing of recurring events, following the icalendar standard. It is a drop-in replacement for the Zope2 DateIndex and will produce the same results for non-recurring dates.
The DateRecurringIndex accepts following parameters:
Inside Zope2 everybody uses DateTime.DateTime or iow the Zope-DateTime. At time of writing Zope-DateTime (around 1998) there was no good date/time implementation in python. But these days we have a better implementation. Even if the pythons datetime implementation has its problems, together with pytz for timezone handling it is very mature.
So, why is it covered here? Just because dst-handling over recurring events works only if the start and until values are non-naive python datetimes. Just keep it in mind when using this index: If you use recurring dates and you want dst-adjust make sure your implementation returns a python datetime. And also keep in mind: If youre i.e. in Austria with CET timezone, add a recurring date: it will look fine to you, every day at 11:00am, doesnt matter if DST or not, your event happens. If you go international and your event is shown in a different timezone - or in the same in a country without DST at all - it might differ and is not always at the the time.
Copyright (c) 2008-2012, BlueDynamics Alliance, Austria and contributors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY BLUEDYNAMICS ALLIANCE AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEDYNAMICS ALLIANCE AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.