Comment Re:It probably won't last another 4 years (Score 1) 277
Paradise Pete wrote:
Well, line 10 is wrong. Day 366 should not change the year for leap years. Also, days is the number of days since 1980, and you're not dealing with that. What you have to do is walk forward through the years so that you land on the proper year and day.
Sorry for being unclear. I was using "days" as a variable to mean basically the julian date (resetting it to "0" on the first day of each year), not the total number of days since a specific year. In the same way, I was thinking of "years" as a separate variable indicating the current year.
To clarify, essentially leap years would start on day 0, non-leap years would start on day 1, each year would end on day 365, and on 1 Jan the calendar would show day 366 which would then prompt the system to change the year and then set the day to 1 or 0 (depending on whether the new year is a leap year or not).