AS2 Need help in displaying a movie depending on date
Hi all,
I really hope someone can help me with the below. I've spent all day trying to fix it, but with no luck. I have an ad which needs to trace "Pre Release" on and before 27/08/2013. I then need to display "Out Friday" on dates 28/08/2013 - 29/08/2013. The last one I have is the tricky one. On and after 30/08/2013 I need it to display "Out Now", but with the code below I can't get this to work. After 30/08/2013 it's displaying "Pre Release" instead of "Out Now".
Sorry in advance if this isn't very clear, but any help would be greatly appreciated.
var_PreRelease = new Date(2013,8,27);
var_OutFri = new Date(2013,8,29);
var_OutNow = new Date(2013,8,30);
var_OutNow = new Date(2013,9,1);
// set up a variable for todays date
var_Today = new Date();
if(var_Today.getDate() <= var_PreRelease.getDate() )
{
trace("Pre release");
}
if(var_Today.getDate() == var_OutFri.getDate() )
{
trace("Out Friday");
}
if(var_Today.getDate() == var_OutFri1.getDate() )
{
trace("Out Friday");
}
if(var_Today.getDate() == var_OutNow.getDate() || var_Today.getDate() > var_OutNow.getDate())
{
trace("Out Now");
}
