+ output += '<div class="items">\n'
+ for date in self.planet:
+ output += '<h1>%s</h1>\n' % time.strftime('%A %B %d, %Y', time.localtime(date.planetDate))
+ for item in date.items:
+ output += self.__write_item__(item)
+ # see how many items we've written
+ itemcount += 1
+ if itemcount >= self.maxitems:
+ break
+ # again, check to see if we've written the maximum number of items
+ if itemcount >= self.maxitems:
+ break
+ output += '</div>\n'