Hello,
I was wondering if someone could break down the following code for me and make it a bit easier so that i can just set a start date / end date.
Thanks.
Code: function displayDifference()
{
nowTime = new Date();
hoursLeft = ((((16-nowTime.getDate())*24) + (20 - nowTime.getHours())));
//hoursLeft = (4 - nowTime.getDate()) * 24 + (19 - nowTime.getHours());
if (hoursLeft >= 0)
{
timeRemaining.text = hoursLeft + ":" + padString(59 - nowTime.getMinutes()) + ":" + padString(59 - nowTime.getSeconds()) + "";
}
else
{
timeRemaining.text = "0H 0M 0S";
} // end else if
} // End of the functionWhat i want to do is have a Start date of a value such as July 1st
and end date of July 31st
i'm not sure how similar this is to javascript esentially i want it to be like this.
Code: /* Date Animation starts here*/
$(function () {
var austDay = new Date();
var austDay = new Date("June 30, 2012 21:00:00");
$('#countdown').countdown({until: austDay, layout:
'<div id="days" class="numbers">{dnn}</div>'+
'<div class="spacer"></div>'+
'<div id="hours" class="numbers">{hnn}</div>'+
'<div class="spacer"></div>'+
'<div id="minutes" class="numbers">{mnn}</div>'+
'<div class="spacer"></div>'+
'<div id="seconds" class="numbers">{snn}</div>'+
'</div>'});
});});
Hello Countdown Timer
Friday, June 29, 2012
[Action Script] Hello Countdown Timer June,2012
Posted by Bimo Hery Prabowo at 11:13 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment