note 39112 deleted from function.date by kennyt

From: Date: Sun, 18 Jul 2004 17:27:00 +0000
Subject: note 39112 deleted from function.date by kennyt
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73510@lists.php.net to get a copy of this message
Note Submitter: Özgür Kaya ---- Here is a code that prints the first day and the last day of the current week as the "YYYY-mm-dd" date format. $diffday=date("w")-1; $addday=7-date("w"); $date1=mktime(0,0,0,date("m"),(date("d")-$diffday),date("Y")); $tarih2=mktime(0,0,0,date("m"),(date("d")+$addday),date("Y")); $firstday=date("Y-m-d",$tarih1); $lastday=date("Y-m-d",$tarih2); print("$firstday---$lastday"); okaya@netorbits.com

« previous php.notes (#73510) next »