[icalendar-dev] how to verify if a date is into the ical file ?

Michael REMY Askus michael at askus.fr
Fri Mar 30 17:24:54 CEST 2007


hi,

this is my first question after subscribed to the mailing list.
This module is very useful for my application (TinyERP) to determinate 
easter days (stored in a iCal file)

But, i don't find in the doc how to verifiy is a date is present or not 
into a iCal file.
What is the method ?

In waiting your answer, i justed do a string presence of the date, like 
a novice !
for exampl :

from icalendar import Calendar, Event
            cal = 
Calendar.from_string(open('/home/remy/local/dev/cvs_cpn/SV3.4.0.1/bin/icalendar/france.ics','rb').read())
       
            txt=str(cal)
            found=False
           
            thedate="20070521"
            if (found==False and txt.find(thedate)!=-1):
                found=True

So, is there any method to test a date instead this string search one ??

Thank for help

Mike (from France)



More information about the icalendar-dev mailing list