I´d like to create a function that checks if a “post” (wordpress) is older than 7 days. I have the following code so far:
function is_old($start) {
$now = date("Y-m-d");
}
$start
contains the date which I want to check if is more than 7 days prior to $now
. How can I do this?
If
$start
is a date, this works:If
$start
is a timestamp, you can omit the firststrtotime
.If
$start
is a timestamp you have just to do