$def with (links, span, base, offset, limit, total) $ last_date = None $for link in links: $ date = link.to_datestr() $if date != last_date: