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!
More Useful d) None of the Above Articles:
✔ What's the most popular Halloween candy?
It's Halloween, All Hallow's Eve, and in the United States, at least, that means it's time for a strange custom that children throughout...✔ Review: Sony NEX-5N Digital Camera
This is a guest post by professional photographer Paul M. Bowers... I was born and raised in the briar patch of commercial photography-...✔ How do other countries celebrate Independence Day?
Hello Mr. Taylor. The other kids in my class say that every country celebrates Independence Day on July 4th and that it's a...✔ What is a ponzi scheme?
Dave, a friend of mine listened politely to my explanation of how a multi-tiered marketing system I've signed up for works, then told...✔ Update firmware on my Panasonic Blu-Ray DVD player?
I have a Panasonic DMP-BDT320 blu-ray DVD player and it's starting to report that I need a 'firmware' update or upgrade. I have...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
I do have a comment, now that you mention it!
Check This Out Too...
Look for Answers
All Our Categories
Apple iPad Help
Articles and Reviews
Auctions and Online Shopping
Blogs and Blogging
Building Web Site Traffic
Business and Management
Computer and Internet Basics
d) None of the Above
Google Gmail Help
Google Plus Help
Industry News and Trade Shows
iPhone and Cell Phone Help
iPod, Sony PSP and MP3 Player Help
Kindle Fire Help
Mac OS X Help
Pay Per Click (PPC) Advertising
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
Find Me on Google+
ADT on G+