Re: Correcting AGE_INFO
Re: Correcting AGE_INFO
- Subject: Re: Correcting AGE_INFO
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 4 Feb 2010 18:41:35 -0500
On Thu, Feb 4, 2010 at 6:00 PM, Nigel Garvey
<email@hidden> wrote:
> "email@hidden" wrote on Thu, 4 Feb 2010 09:56:25 -0800:
>
>> Here are two more possible solutions:
>
> Well, that should give Bert some choice! :)
>
> Results returned for the dates from 28th January 2010 to today (4th
> February 2010):
Let's look at what that ought to be. Note that it depends on whether
you count inclusively (counting the start date) or exclusively (not);
the upward rounding in Bert's query makes me think he intended
inclusive counting, which is what I intended my solution to yield.
28th (Thu)->Fri->Mon->Tue->Wed->Thu: 6 (incl)/ 5 (excl)
29th (Fri)->Mon->Tue->Wed->Thu: 5/4
30th (Sat)->Mon->Tue->Wed->Thu: 4/4
31st (Sun)->Mon->Tue->Wed->Thu 4/4
1st (Mon)->Tue->Wed->Thu 4/3
2nd (Tue)->Wed->Thu 3/2
3rd (Wed)->Thu 2/1
4th (Thu) 1/0
So it seems the correct list of answers is either { 6,5,4,4,4,3,2,1 }
or { 5,4,4,4,3,2,1,0 }; only Ed's solution yields either of those
lists exactly. However, the discrepancies in the other results are
entirely confined to the case where the start date is itself a
weekend. (I imagine similar discrepancies would arise when the end
date were a weekend, as well.)
> NG (adjusted_age): {5, 4, 3, 3, 3, 2, 1, 0}
> Deivy (correct_AGE_INFO): {5, 4, 3, 4, 3, 2, 1, 0}
> Mark (business_days): {6, 5, 3, 3, 3, 3, 2, 1}
> Luther (workDaysOld): {5, 4, 3, 3, 3, 2, 1, 0}
> Ed (CountBusinessDays): {6, 5, 4, 4, 4, 3, 2, 1}
--
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