note 14156 added to function.getdate.php

From: Date: Thu, 19 Jul 2001 01:40:13 +0000
Subject: note 14156 added to function.getdate.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15561@lists.php.net to get a copy of this message
Hi , all I have a case ,must be know the week of first day ,so I wrote a easily code , maybe it would help you to do something !! $today_var = getdate(); $today_sec = mktime(0,0,0,date("m"),date("d"),date("Y")); $offset = $today_var[wday] * 86400 ; $first_day = $today_sec - $offset; echo $this_week_first_date = date("Y-m-d", $first_day); // yes , count the week of firstday !! // by Vincent.hu http://www.php.net/manual/en/function.getdate.php

« previous php.notes (#15561) next »