in reply to Re^2: How preparing the weekly shift roster led to a fascinating discovery...
in thread How preparing the weekly shift roster led to a fascinating discovery...
To explain in a bit more detail what you have already found: As a normal year has 52 weeks and one day, January of the same year must thus be a "-1" (or "+6") compared to the day of the 1st of March of the same year.
In a leap year, (52 weeks and two days) January 31st will be a "-2" (or "+5") day, but it can never ever be a "+3" day.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|