I don't quite understand. Your magic month numbers are 3 digits, but you only use one digit in your example. And how does substituting 2012 work, when 2012 was a leap year but 1900 wasn't?
And we can substitute 2012 for 1900 because we make a correction in Jan and Feb in leap years. Knowing that 1900 was not a leap year means we don't make the correction, but 2012 was a leap year so we do.