Re: Correcting AGE_INFO
Re: Correcting AGE_INFO
- Subject: Re: Correcting AGE_INFO
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 5 Feb 2010 07:00:22 -0500
On Fri, Feb 5, 2010 at 6:43 AM, Nigel Garvey
<email@hidden> wrote:
> Obviously we all had to make our own decisions about what to do if
> either of the input dates was a Saturday or a Sunday. I posted the
> various script results to help Bert and for the interest of the other
> contributors. Sorry if I seemed to imply any criticism.
Absolutely not! I'm sorry if my post came off as defensive; I didn't
take your post as critical. I was just trying to provide a standard
against which to compare the results you compiled.
> Yes. I noticed the upward rounding myself, but since Bert's script made
> no attempt to convert 'days' as 24-hour periods to days as calendar
> entities, I didn't see the point of it and decided to ignore it.
FWIW, looking around at the various algorithms on the net and the
NETWORKDAYS function in Excel (which I can't help but read as "network
days" instead of "net workdays"), inclusive counting is the norm.
>From a workday to itself is one day, not zero.
Also, the problem is usually cast as counting the number of business
days between two dates (inclusive of those dates), which answers the
question of what to do when starting or ending on a weekend. Simply
start counting with the first business day *on or after* the first
date, and stop counting with the last business day *on or before* the
last date. My list of manually-counted answers used that method, and
so is more correct than the answers produced by my coded solution.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden