GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   I need a javascript or php script that shows the day before (https://gfy.com/showthread.php?t=477256)

mkx 06-06-2005 02:48 AM

I need a javascript or php script that shows the day before
 
I need a script that will read the day before, or even 2 days, Ex.

Latest Submission 06/04/2005

ddfGandalf 06-06-2005 03:00 AM

$ystday = date('d/m/y', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));

And so on..

woj 06-06-2005 03:02 AM

$yesterday=date('m/d/Y',time()-86400);

mkx 06-06-2005 01:45 PM

Thanks, got it working! Using the first script:

$ystday = date('m/d/y', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));

How do I make it so it shows MM/DD/YYYY instead of MM/DD/YY?

woj 06-06-2005 01:48 PM

$ystday = date('m/d/Y', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));


All times are GMT -7. The time now is 02:25 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123