Re: workdays
| From: | Richard Lynch | Date: | Tue, 14 Nov 2000 22:06:08 +0000 |
| Subject: | Re: workdays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25282@lists.php.net to get a copy of this message | ||
> I need a function to calculate the difference, in days, between to
> given dates BUT taking only the work days. Similar to the "networkdays" in
> excel.
> Has anybody know how to do this??
I'm pretty sure somebody posted some sample code to do this somewhere...
Either here or in one of the code archives linked from
http://php.net/links.php
You should be able to do it fairly easily, actually, by just counting the
total days and weeks and working out if either day is a weekend etc. Of
course, holidays are also going to be tricky, if you need to take those into
account.