Picky Picky periodicity
My back-burner project for the CAPTION web site is something that I shall give the working name of Picky Picky Game. This game will work in rounds, with everyone able to vote for a picture from this round at the same time as people are submitting pictures for the next round. The idea is that we make a comic strip out of the favourite pictures from each round.
A round might last a week or a month (depending on how often people submit new pictures), so I want to make it a configuration parameter. The code I was working on today was the routine that works out the current round number, given today’s date, the start date, and the period. For example, if we had 2-week rounds and had started on 1 January 2002, then we would today (2002-10-31) be in Round 21.