![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
|
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Confirmed User
Join Date: Nov 2002
Posts: 880
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Location: Location:
Posts: 1,245
|
isnt there already a flag for yesterday in php?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Join Date: Jul 2002
Location: Here now, ok?
Posts: 19
|
$yesterday = date("F d Y", time()-86400);
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
|
Quote:
REALLY weird hey? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Nov 2002
Posts: 880
|
Sorry Correction,
$yesterday = date("F d Y",mktime(0,0,0,date("m"),date("d")-1,date("Y"))); ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,114
|
This thread is hilarious
![]() Cheers to patch for an answer that makes sense. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Feb 2004
Location: Ohio, US
Posts: 662
|
hey dude, just use strtotime("-1 day");
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Registered User
Join Date: Jul 2002
Location: Here now, ok?
Posts: 19
|
Quote:
![]() And the full line is shorter that way.... |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
So Fucking Banned
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
|
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Industry Role:
Join Date: Jan 1995
Posts: 2,417
|
You guys are crazy.
Yesterday was the 28th. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Join Date: Nov 2002
Posts: 880
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |