Ben C wrote:
> I am trying to add 5 business/week days to today's date. Does anyone
> know a good way of how to do it?
Untested Code:
\n";
$mdy = date('m/d/Y', $now);
list($m, $d, $y) = explode($mdy);
$workdays = 0;
$then = $now;
while ($workdays < 5){
$then += 60 * 60 * 24; //24 h
Lookup the manual in the date and time section, more specifically:
http://uk.php.net/mktime
If the date is then on a weekend, you can add whatever days you need.
HTH,
Mikey
> -Original Message-
> From: Ben C [mailto:[EMAIL PROTECTED]
> Sent: 11 February 2005 15:38
> To: php-general@li
2 matches
Mail list logo