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

def zope-coreblog-1.0::COREBlog::COREBlog::month_archive_items (   self,
  count = 1,
  start_year = 0,
  start_month = 0 
)

Return list of month archive. 

Definition at line 837 of file COREBlog.py.

00837                                                                     :
        """ Return list of month archive. """
      count = r2i(count,1)
      start_year = r2i(start_year,0)
      start_month = r2i(start_month,0)
        if start_year == 0 or start_month == 0 or start_day == 0:
            #Base date is today
            t = localtime(time())
            year = t[0]
            month = t[1]
        else:
            year = year
            month = month

        ret_l = []
        cnt = 100   #limitter
        while cnt > 0 and count > 0:
            if not self.datemap.has_key(year):
                break;
            year_s = self.datemap[year]
            if year_s.has_key(month):
                ret_l.append({"year":year,"month":month})
                count = count - 1
            month = month - 1
            if month < 1:
                month = 12
                year = year - 1
            cnt = cnt - 1

        return ret_l


    security.declareProtected(View, 'getMonthName')
    def getMonthName(self,month):


Generated by  Doxygen 1.6.0   Back to index