Back to index

plone3  3.1.7
getDaysClass.py
Go to the documentation of this file.
00001 ##parameters=day, month, year, event=None
00002 
00003 # Is the date given today?
00004 # If so we want to return a class of 'todayevent' so that the event gets the
00005 # today border around it.
00006 # If not we want to return just 'event' so the event gets the proper shading.
00007 
00008 import DateTime
00009 
00010 current = DateTime.DateTime()
00011 
00012 if current.year()==year and current.month()==month and current.day()==int(day):
00013   if event:
00014     return "todayevent"
00015   else:
00016     return "todaynoevent"
00017   
00018 if event:
00019   return "event"
00020 else:
00021   return ""