Under Construction Template Countdown Timer Help?

Question by katherynderoet: Under Construction Template Countdown Timer Help?
Hello everyone, been looking for a solution to this one for a couple of days, with no luck, so am hoping someone here can help me.

I downloaded an under construction template from here that incorporates keith wood’s countdown timer jquery plugin.

Its a perfect template for my site. Trouble is i just can’t find a way to adjust the timer. it works fine, without adjusting any of the code but it’s default display reads that there’s 500+ days estimated to launch. As it’s for my business website i don’t want people to be put off visiting again, so i wanted to adjust the timer to just a few days. (i.e estimated time of launch 3 days, 72 hrs, however many mins & secs)

From my googling most people suggest that the code to change is located in the html file:

Specific advice looks at the “austDay = new Date(austDay.getFullYear() +2, 0, 0);” the only solutions i have found say to play around with the “+2, 0, 0″ part, i have tried allsorts of ways but either the timer does not change at all or displays nothing. Others suggest to set the var austday=new date() to a specific date, tried that and nothing happens.

I am guessing that there is more to it than changing the HTML. I also looked at Keith’s site, but i’m not technically minded enough to understand what his examples do or where they go within the code structure.

So if someone can tell me what files needs to be tweaked to adjust the timer to reduce the number of days, and how you would go about it.

Don’t know if it makes any difference but am working on the files in dreamweaver cs4, i have tried the authors of the template, but no response.

I really would appreciate any help at all. Thank you :)
Little Princess. You are a star, thank you sooooo much!

I think that not knowing that january is 0 is what was stuffing things up.

Makes sense that it wasn’t doing anything when I was trying to get it to countdown to a point in the past. Funny how something so simple can stop you in your tracks.

Anyway, all working now, and again i thank you so much :)

Best answer:

Answer by Little Princess
I’m kind of a novice with javascript, but from what it looks to me, austDay will always be New Years Day two years from now.

The var austDay = new Date(); line sets austDay to the current date & time.

Then when you do austDay = new Date(austDay.getFullYear() +2, 0, 0); it takes whatever was in austDay and adds two years to it and sets the month, day, hr, min, secs to zero, i.e. Midnight on the morning of Jan 1, 2012 if run right now.

If you know the specific day & time that you want the counter to target, just do something like
austDay = new Date(2010, 10, 4, 12, 30); // for 12:30pm Nov 4, 2010 — remember, months start with zero so 10=november

What do you think? Answer below!

About Admin