note 45381 deleted from function.date by tularis

From: Date: Sun, 30 Jan 2005 14:44:52 +0000
Subject: note 45381 deleted from function.date by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84230@lists.php.net to get a copy of this message
Note Submitter: mspellecacy at frakle dot com ---- I was confronted with the needed to find the nearest 'workday' to rounding up from 30 days into the future...ignoring holidays and such this is what I came up with: <?php $i=30; while ((date("D",strtotime("+$i days")) == ("Sat")) || (date("D",strtotime("+$i days")) == ("Sun"))) { $i++; }; echo date("l F jS, Y",strtotime("+$i days")); ?> is there a better solution that I'm just overlooking?

« previous php.notes (#84230) next »