static int ticksToYear(long ticks) { // estimate the year to get us in the ball park, then // match the exact year using the yearTicks lookup table int year = (int)(ticks/nsPerYear) + 2000; if (yearTicks[year-1900] > ticks) year--; return year; }