save_titles = titles[:]
titles.reverse()
- save_day = None
+ save_date = None
for year, month, day, file, title, lead in titles:
href = []
if level == 0:
href.append(file)
href = '/'.join(href)
if day[0] == '0': day = day[1:]
- if save_day <> day:
+ if save_date <> (year, month, day):
if level == 0:
new_text.append('\n<h2>%s %s %s</h2>' % (day, months_names_ru[int(month)], year))
else:
new_text.append('\n<h2>%s %s</h2>' % (day, months_names_ru[int(month)]))
- save_day = day
+ save_date = year, month, day
if lead:
lead = lead + ' '
else: