# Changing a date to next year in a countdown timer

**URL:** https://forum.kirupa.com/t/changing-a-date-to-next-year-in-a-countdown-timer/172559
**Category:** flash
**Created:** [December 15, 2005, 4:11pm UTC](https://forum.kirupa.com/t/changing-a-date-to-next-year-in-a-countdown-timer/172559 "2005-12-15T16:11:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![revjackassholio](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@revjackassholio](https://forum.kirupa.com/u/revjackassholio)
#### Post date: [December 15, 2005, 4:11pm UTC](https://forum.kirupa.com/t/changing-a-date-to-next-year-in-a-countdown-timer/172559/1 "2005-12-15T16:11:13Z")

</div>

I am trying to make a countdown timer and am using this code:

// first get this current year so this example  
// remains valid for some time to come  
currentDate = new Date();  
thisYear = currentDate.getFullYear();  
eventDate = new Date(thisYear, 11, 25);  
eventMillisecs = eventDate.getTime();

This works great for countig down to the end of this year, but I want to modify it to countdown to a date next year 04-28-06. How can I change this to get it to work…

Thanks, Marc
