Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::COREBlog::COREBlog::get_calendar (   self,
  year = 0,
  month = 0,
  firstweekday = SUNDAY 
)

Reutrn list of days for the month

Definition at line 1170 of file COREBlog.py.

01170                                                              :
        """Reutrn list of days for the month"""
        if year == 0 or month == 0:
            #return calendar of 'now'
            t = localtime(time())
            year = t[0]
            month = t[1]
        else:
            year = int(year)
            month = int(month)

        setfirstweekday(firstweekday)
        days = monthcalendar(year,month)
        week_list = []
        for week in days:
            d_l = []
            for day in week:
                d_l.append({"day":day,"entry_count":self.countEntryOfTheDay(year,month,day)})
            week_list.append(d_l)

        return week_list


    security.declareProtected(View, 'countEntryOfTheDay')
    def countEntryOfTheDay(self,year,month,day):


Generated by  Doxygen 1.6.0   Back to index