Monday, October 5, 2015

How many seconds are in 21.25 years?

Apparently Siri and Google disagree over this.
Well, it's pretty clear how Google came up with the answer. They just took 21.25 years multiplied by 365 days multiplied by 60 minutes multiplied by 60 seconds. Clearly, Google doesn't care about leap years, or maybe they just deny their existence like some people do with the moon landing. Anyway, that's a different topic for another day. The real question is what in the actual heck is Siri thinking? Maybe she's really tired, I mean her battery is clearly at zero percent. I mean, if we started today and go forward 21.25 years we'd hit exactly 6 leap years: 2016, 2020, 2024, 2028, 2032, 2036. Well, let's just add 6 days to our answer:
670140000 + 6 * 24 * 60 * 60 = 670658400
Huh, does Siri have you stumped how she does her magical Apple math yet? Or maybe she's drunk?

OK, I'll give you the answer, but first I gotta give you some facts about leap years. You probably know that every four years we have a leap year, including an extra day, but what you may not have known is that every 100 years we break that rule, except every 400 years we break the rule that breaks the rule. 

To put it plainly, 1896 was a leap year, but 1900 was not. 1996 was a leap year, and so was 2000. So, what Siri is doing is taking the average length of a year using the leap year rules and the Gregorian calendar (who's Greg, and why do we use his calendar is a entirely different topic). Following those rules, a year is 365.2425 days long.
21.25 * 365.2425 * 24 * 60 * 60 = 670585230
Now you know the answer to Siri's disagreement with Google. As far as who is right? Well, perhaps the original question isn't specific enough.