6 is the last day of the week (sunday)

last_date.wday gives you a (zero-indexed) Day of the Week (ie. Monday = 1)

6 (Sunday) minus 1(Monday) = 5 days in the week AFTER monday

I'll refactor it to be more readible