jeff5656 Posted February 13, 2012 Share Posted February 13, 2012 I have a jquery plugin that is a live countdown timer and I would like to modify it. Can someone tell me how to modify the code below so that the date is 20 minutes from right now (currently it is set as 26 January 2013). <script type="text/javascript"> $(function () { var austDay = new Date(); austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); $('#defaultCountdown').countdown({until: austDay}); $('#year').text(austDay.getFullYear()); }); </script> Quote Link to comment Share on other sites More sharing options...
Psycho Posted February 13, 2012 Share Posted February 13, 2012 Try austDay.setMinutes(austDay.getMinutes()+20); Or austDay = new Date(austDay.getFullYear(), austDay.getMonth(), austDay.getDay(), austDay.getHours(), austDay.getMinutes()+20); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.