View Single Post
Old 12-31-2008, 09:16 PM   #22 (permalink)
BubbaGump
Banned
Squirt
 
Join Date: Nov 2008
Posts: 21
BubbaGump is on a distinguished road
Default

Code:
year = ORIGINYEAR; /* = 1980 */

while (days > 365+IsLeapYear(year))
{
    days -= 365+IsLeapYear(year);
    year++;
}
Much simpler solution.



BubbaGump is offline   Reply With Quote