PHP: date minus one day
-
Not really a WP question, but I’m doing a query to seperate past from future posts, to make a list of upcoming events. In this case events on this day should still be on the list with upcoming events (because they’re not past yet…).
I have this:
$now= date("Y-m-d H:i:s",$t); if(($post->post_date)>$now)
but this will move events which happen now (= this day) to the list of past events. How can I modify it to include the present day?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP: date minus one day’ is closed to new replies.