|
How do I figure out how many days I've been alive?For a school project I'm supposed to figure out exactly how many days I've been alive. Is there some easy way to do that or do I have to count how many days since my last birthday plus the number of years I've been alive? A perfect question for the last day of the year, as I'm writing this on December 31, 2010. December, btw, gets its name from it being the tenth (dec) month in the early Roman calendar. In fact, Sept = seven, Oct = eight, Nov = nine too. Good random trivia! As you know from the existence of leap years, our calendar doesn't quite perfectly encompass a year of time, so every four years we add a day on February 29th. When do those occur? It's a bit tricky: we have leap years when the year is exactly divisible by four, with the exception of century years that aren't also divisible by 400. A century year is a year that ends with "00", like 1900, 2000, and so on. If those are evenly divisible by 400, like 2000 (which is 5 * 400), then it's also a leap year. 1900, on the other hand, wasn't a leap year as it isn't evenly divisible by 400. So your calculation will need to take into account leap years, which, since we know 2000 was a leap year, means that for the last 110 years every fourth year has been a leap year. Start with 2008 as the most recent leap year (until it's 2012, of course, but according to the Mayan calendar we have all sorts of other issues to worry about at that point). To calculate how many days you've been alive, I think you're on the right track, though I would do it slightly differently. I would calculate the number of days that occurred between the day of your birth and the end of that year and the number of days between the first day of the current year and the current date. That way when you calculate years, the leap year rule applies evenly. For example, I was born on August 3rd of, oh, let's say, 1970. August 3 is the 215th day of the year on non-leap years (which I ascertained by using Google to search for what day of the year is august 3, btw!), which means that there were 365 - 215 (150) days left in that first year. Today is the last day of 2010, a non-leap year, so that's easy: it's the 365th day of the year. 2009 - 1970 = 39 years, so that's 39 * 365 + leap years days total. (why not 2010 - 1970? Because we've already factored in the days in the current year) How many leap years occurred? 1970 wasn't a leap year (not divisible evenly by 4) but 1972 was (4 * 493), so 72, 76, 80, 84, 88, 92, 96, 00, 04 and 08 were leap years, which means we'll need to add 10 extra days. Our formula therefore looks like this: 150 days in the first year I was alive For a total of 14,760 days between the day I was born in 1970 and the current, last, day of the year, 2010. Let's check: 14760/365 = 40.4, or 40 years and roughly five months. Yeah, that's about right for a 1970 birthday. Having gone through all the tedious calculations, there are of course Web pages online that can easily calculate the number of days between two dates (see calculate date math) but those don't explain how they're doing the calculation, so they're not as interesting. Still, it's good to be able to double check your calculation! Hope that helps you out! Also check out:
Categorized:
d) None of the Above
(Article 9732,
Written by Dave Taylor)
Tagged: date math, leap years Previous: How do I change the lock or home screen on my iPhone? Next: How do I copy / paste a Web URL on my iPhone? Subscribe!
Comments (5) · Add Comment
"...14,235 (38 * 365) days in the intervening years" 14,235 is //39// times 365. Posted by: Some Random Guy on the Internet at January 9, 2011 3:11 AMYou're right, I forgot to update the explanation of where the numbers came from. Fixed. :-) Posted by: Dave Taylor at January 9, 2011 10:49 AMJust go here http://www.wolframalpha.com/ and type you birth date Posted by: byronfern at January 29, 2011 1:02 PMFor the total number of days you've been alive, you would also have to count your birthday, so your total should be 14,761 days. Wouldn't it? Posted by: Dennis K at March 28, 2011 12:43 PMNot sure, Dennis. Let's say I was born on the 5th. On the 6th, have I been alive one day, or two? Posted by: Dave Taylor at March 28, 2011 12:50 PM
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Gmail Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Pinterest Help Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |