# One day expiration

**URL:** <https://forum.kirupa.com/t/one-day-expiration/168422>\
**Category:** flash\
**Created:** [November 7, 2005, 4:30am UTC](https://forum.kirupa.com/t/one-day-expiration/168422 "2005-11-07T04:30:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith30](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@Keith30](https://forum.kirupa.com/u/Keith30)\
**Post date:** [November 7, 2005, 4:30am UTC](https://forum.kirupa.com/t/one-day-expiration/168422/1 "2005-11-07T04:30:23Z")

</div>

How would I modify this source if I wanted to have a one day then expire?  
I would like the source to use the time and/or date the swf was launched and count down to one work for one day.

var start = new Date(2003, 1, 1);  
// set start equal to 11/1/2003 (Jan = 0)  
var end = new Date(2004, 0, 15);  
// set end equal to 1/15/2004; do not put zeros in front of numbers  
if (now  
// if date is before start, then they’re trying to cheat us, so give error message  
trace(“If you’re seeing this then the now is before the START date, meaning they’ve set the clock back too far.”);  
trace(“The START date is:”);  
trace(start);  
trace(“Today’s date (now) is set at:”);  
trace(now);  
\_root.gotoAndStop(31);  
} else if (now\>end) {  
// if date is after end, then go to end  
trace(“If you’re seeing this then the now is before the END date”);  
trace(“The END date is:”);  
trace(end);  
trace(“Today’s date (now) is set at:”);  
trace(now);  
\_root.gotoAndStop(31);  
} else {  
trace(“Everything is hunky-dorey, let’s go!”);  
play();  
}  
stop();
