![]() |
quick php date() help
You'll see what I am trying to go... hopefully lol
$yesterday = date(("F")+(("d")-1)+("Y")); I am trying to minus 1 from the d, so I get "yesterday". How can I do this? I am probably making it too difficult. :p |
Quote:
|
isnt there already a flag for yesterday in php?
|
$yesterday = date("F d Y", time()-86400);
|
Quote:
REALLY weird hey? |
Quote:
|
Sorry Correction,
$yesterday = date("F d Y",mktime(0,0,0,date("m"),date("d")-1,date("Y"))); :glugglug |
This thread is hilarious :1orglaugh
Cheers to patch for an answer that makes sense. |
Quote:
|
hey dude, just use strtotime("-1 day");
|
Quote:
And the full line is shorter that way.... |
date("F d Y", strtotime("yesterday"));
date("F d Y", strtotime("-1 day")); should have plenty of ways to do it lol.. I prefer the mktime method |
You guys are crazy.
Yesterday was the 28th. |
Quote:
|
All times are GMT -7. The time now is 09:09 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123