Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


> 144 : Jan, Feb, Mar

So Jan=1, Feb=4, Mar=4

> 025 : Apr, May, Jun

So Apr=0, May=2, Jun=5

... and so on.

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.


Thanks. Would have been easier to grasp though if you'd phrased it like

> 1,4,4 : Jan, Feb, Mar.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: