[X-Unix] shell script to determine 1st business day of month ?

Russell McGaha russellmcgaha at mac.com
Wed May 7 10:55:02 PDT 2008


Doug;
	I'm going to be using this "in-house".  I've the advantage of being  
able to determine our Holidays in advance, and will match the results  
against a text file of out Holidays.

Russell

There IS more than one way to skin a cat; unfortunately the cat  
doesn't like any of them!

On May 7, 2008, at 12:09 PM, Doug McNutt wrote:

> At 11:31 -0500 5/7/08, <ecrist at secure-computing.net> wrote:
>> On Wed, 7 May 2008 10:40:11 -0500, Russell McGaha  
>> <RussellMcGaha at mac.com>
>> wrote:
>>> Folks;
>>> 	Do any of you know of a script callable from BASH, that will / can
>>> say if today (or a given date) is the first business day of the  
>>> month??
>> #!
>> Russell,
>>
>> It wouldn't be too difficult to write a simply shell script to  
>> figure this
>> out for yourself.  Something like a loop, foreach $day do; $day ==  
>> $day++;
>> if $dayofweek != (Saturday|Sunday) then echo "first business day".
>
> I once tried that with M$Excel VBA macros and discovered that the  
> math was easy but the politics made the result useless for what I  
> wanted which was to figure dates that were business days for banking.
>
> Altogether too often the first day insisted on being a bank holiday  
> that was only discoverable with access to someone's ever changing  
> database that even depended on the state or province.
>
> -- 
>
> --> From the U S of A, the only socialist country that refuses to  
> admit it. <--
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix



More information about the X-Unix mailing list