Another fix for weekday assingments

Fixed week generation code so that the assignments don't become
misaligned after a few months.