note 62598 added to function.getdate

From: Date: Sat, 04 Mar 2006 13:47:31 +0000
Subject: note 62598 added to function.getdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-104825@lists.php.net to get a copy of this message
// This functions calculates the next date only using business days // 2 parameters, the startdate and the number of businessdays to add function calcduedate($datecalc,$duedays) { $i = 1; while ($i <= $duedays) { $datecalc += 86400; // Add a day. $date_info = getdate( $datecalc ); if (($date_info["wday"] == 0) or ($date_info["wday"] == 6) ) { $datecalc += 86400; // Add a day. continue; } $i++; } return $datecalc ; } ---- Server IP: 194.109.193.119 Probable Submitter: 145.99.160.162 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.getdate.php Edit -- http://master.php.net/note/edit/62598 Del: integrated -- http://master.php.net/note/delete/62598/integrated Del: useless -- http://master.php.net/note/delete/62598/useless Del: bad code -- http://master.php.net/note/delete/62598/bad+code Del: spam -- http://master.php.net/note/delete/62598/spam Del: non-english -- http://master.php.net/note/delete/62598/non-english Del: in docs -- http://master.php.net/note/delete/62598/in+docs Del: other reasons-- http://master.php.net/note/delete/62598 Reject -- http://master.php.net/note/reject/62598 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104825) next »