note 62598 deleted from function.getdate by googleguy

From: Date: Tue, 22 Oct 2013 14:55:45 +0000
Subject: note 62598 deleted from function.getdate by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197246@lists.php.net to get a copy of this message
Note Submitter: Cas_AT_NUY_DOT_INFO ---- <?php // 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 ; } ?>

« previous php.notes (#197246) next »