What I\'m trying to do seems like it should be simple but is proving tricky. I need a countdown script that uses a target date and gives me three separate figures - namely Days,
In the example you get seconds by subtracting the two time objects so lets start there:
totalseconds % 60
, remainder of seconds
totalseconds / 60
, total minutes
Have you seen this plugin? http://www.keith-wood.name/countdown.html
You should be able to do the math yourself and print it out. Use modulus to get the remainder in minutes and then floor the days.
In the example you get seconds by subtracting the two time objects so lets start there:
totalseconds % 60, remainder of seconds
totalseconds / 60, total minutes
totalminutes % 60, remainder of minutes
etc...
See for code: http://jsfiddle.net/jHVnz/