![]() |
Age Calculation Script
I have a script I use to calculate the age of users in my database
PHP Code:
But when I was inputing an age of 12-16-1899 it returns an age of 38. Any idea why? |
The Unix epoch which mktime uses starts on January 1, 1970. Wikipedia Article
Someone born in 1970 would be 38 today. :-) You will need to some modifications to that script to get accurate ages before that date. You could do something like the following: |
You can still use mktime to get accurate ages.
PHP Code:
|
Quote:
Take a look at the notes section for mktime. Quote:
|
| All times are GMT. The time now is 04:00 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0