Jose Sandoval Google
 Resume     Book     Software     Drawings     Home     Subscribe to RSS feed Search Web Search josesandoval.com

Leap year, 2008
Thursday, February 28, 2008

Once again, it's leap day (well, tomorrow). I'm not sure who else would celebrate February 29 if didn't happen to be a birthday, but I think we should all celebrate it. BTW, it's not my birthday.

When is a year a leap year? This is how you can tell, in Java code:

public boolean isLeapYear(int year) {
// This evaluates to true, if it is a leap year; false, otherwise
return (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
}

For the history of the leap year, check out Wikipedia's article.

In summary, the leap day is just a convention we came up with to account for the true amount of time it takes Earth to go around the Sun, which is not exactly 365 days (of 24 hour days), it's a bit more than that (roughly, 6 hours every year). What's amazing is that every civilization for which we have records knew about this drift. This means that very sophisticated methods to record time had to have existed.

Just a thought experiment, how would you measure time with just sticks and stones?


9:55 AM | 0 comment(s) |

Comments:


This page is powered by Blogger. Isn't yours?

Guestbook
© Jose Sandoval 2004-2009 jose@josesandoval.com