ADSM-L

Re: last sunday of the month

2002-08-19 12:29:46
Subject: Re: last sunday of the month
From: "Ford, Phillip" <phillip.ford AT SPCORP DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 19 Aug 2002 09:19:16 -0400
I do it for the last Friday of the month.  I do it by using the TZ variable
and number of hours for a week (168,  24 hours by 7 days).  My script is
made to run on Friday only (every Friday).  I get the current month(cm) and
I get next weeks Friday's month with the following for central time:

cm=`data +"%m"`
nm=`TZ=CST6CDT-168 date +"%m"`

If cm equals nm then this is not the last Friday of month and quit.
If cm not equal to nm then this is the last Friday of the month.

The same can be done with Sundays.



--
Phillip Ford
Senior Software Specialist
Corporate Computer Center
Schering-Plough Corp.
(901) 320-4462
(901) 320-4856 FAX
phillip.ford AT spcorp DOT com




--
Phillip




-----Original Message-----
From: Burak Demircan [mailto:burak.demircan AT DAIMLERCHRYSLER DOT COM]
Sent: Monday, August 19, 2002 4:03 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: last sunday of the month


How do you achieve to create a schedule for every last sunday of the month?
(there could be 4 or 5 sundays??)
Regards,
Burak

***************************************************************
 This message and any attachments is solely for the intended recipient. If
you are not the intended recipient, disclosure, copying, use, or
distribution of the information included in this message is prohibited --
please immediately and permanently delete this message.

<Prev in Thread] Current Thread [Next in Thread>