age in seconds calculator?
i have a website and would like to have a "your age in seconds" calculator, and a "your weight in bags of sugar" calculator.
Can anyone help? or is there some kind of script already out there that i can use?
Fon age in years to age in seconds (x in years, y in seconds)
y=x * 365*24*3600
Taking count of the number of leap years (n in days)
We end up with
I hope this point you in the right direction?
Of course to be more exact you have to take into account the birthdate substracted from the current date
Age in seconds:
And the date string can be in several, platform dependent formats.
(new Date() - new Date ('1 Jan 1970')) * 100
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
thanks for the replies, i have noted them down and will have a read up on how to actually put this code into a webpage.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)