note 39112 added to function.date
| From: | "�zg�rKaya" at rn2 dot php dot net | Date: | Sat, 17 Jan 2004 12:44:38 +0000 |
| Subject: | note 39112 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63733@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39112
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39112&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39112&report=yes
Search -- http://master.php.net/manage/user-notes.php