Quick Newbie Question about dates...
Posted: Thu Jan 08, 2009 1:23 pm
How do I modify the code below to work with hours instead of days:
function isViewableDate($current_date, $min_notice, $max_notice) {
$min_days = -3; //ideally I would like $min_hours = -75;
$min_date = mktime(0,0,0, date('m'), date('d') + $min_days);
if ($current_date > $min_date)
{
return true;
}
if ($current_date < $min_date)
{
return false;
}
Thanks!
Alison
function isViewableDate($current_date, $min_notice, $max_notice) {
$min_days = -3; //ideally I would like $min_hours = -75;
$min_date = mktime(0,0,0, date('m'), date('d') + $min_days);
if ($current_date > $min_date)
{
return true;
}
if ($current_date < $min_date)
{
return false;
}
Thanks!
Alison