We have a number of products catalogued in our database as having launched on yyyymmdd.
We need to show the "NEW!" image only for products launched within the last 6 months.
This code is not working for us:
$relyear = substr($rel_LaunchDate, 0, 4);
$relmonth = substr($rel_LaunchDate, 4, 2);
$relday = substr($rel_LaunchDate, 6, 2);
$relLDinsec = (mktime (0,0,0,$relmonth,$relday,$relyear));
$sixmonthsback = (mktime (0,0,0,$currmonth,$currday,$curryear)-15552000);
if ($relLDinsec >= $sixmonthsback) {
print "NEW!";
}
Ideas? TIA!