ir.sequence
You can also use 'range_end_' to use the end date of the range, e.g. %%(range_end_year)s.