note 109525 added to function.date
| From: | Leopietroni | Date: | Thu, 26 Jul 2012 09:23:31 +0000 |
| Subject: | note 109525 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189403@lists.php.net to get a copy of this message | ||
This function will add working day to a given timestamp
function addworkinday($timestamp,$daystoadd){
$dayoftheweek = date("N",$timestamp);
$sum =$dayoftheweek +$daystoadd;
while ($sum >= 6) {
$daystoadd=$daystoadd+1;
$sum=$sum-1;
}
return $timestamp +(60*60*24*$daystoadd);
}
----
Server IP: 69.147.83.197
Probable Submitter: 88.52.118.62 (proxied: 128.12.200.251)
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/109525
Del: integrated -- https://master.php.net/note/delete/109525/integrated
Del: useless -- https://master.php.net/note/delete/109525/useless
Del: bad code -- https://master.php.net/note/delete/109525/bad+code
Del: spam -- https://master.php.net/note/delete/109525/spam
Del: non-english -- https://master.php.net/note/delete/109525/non-english
Del: in docs -- https://master.php.net/note/delete/109525/in+docs
Del: other reasons-- https://master.php.net/note/delete/109525
Reject -- https://master.php.net/note/reject/109525
Search -- https://master.php.net/manage/user-notes.php