Couldn't this just be `1 + (nth - jan1) %/% days(7)` or similar? (I always forget the exact syntax you need)