I want to have a countdown to a unix timestamp:
Where it counts down in seconds
Like this:
Expires in: 1d 10h 52m 25s
Heres an example timestamp:
1303725600
How could I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I just made one of those. http://chrischerry.name/coachella
Check out the source for some ideas on how to do it. The “destination” date however isn’t specified by a unix time stamp but that’s easy enough to do.
Its multiplied by 1000 because the javascript Date() wants the time in milliseconds, and unixtimestamps are in seconds.