system — 2012-05-20T06:35:41-04:00 — #1
I want to echo the date of today minus 1 day, how do I do this?
I am thinking its something like - needs to be in human readable format.
$yesterday = time() - 1;
but that doesnt work
scallioxtx — 2012-05-20T06:47:00-04:00 — #2
time() is in seconds, not in days
$yesterday = time() - 24 * 3600, or in PHP >= 5.3
$yesterday = new \\DateTime('-1 day');