HP3000-L Archives

April 2005, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Greg Stigers <[log in to unmask]>
Reply To:
Greg Stigers <[log in to unmask]>
Date:
Thu, 28 Apr 2005 15:00:33 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Is there a handy way to tuck this into a variable? Also, is there a way to
test with different dates? Basically, our week is Sunday thru Saturday, and
I need to use this to test first and last weeks of fiscal month for job
scheduling logic.

Best I have been able to come up with, cribbing from
<http://personal.ecu.edu/mccartyr/ISOwdALG.txt> is:
SETVAR YY ((!HPYYYY-1) MOD 100)
SETVAR C ((!HPYYYY-1) - YY)
SETVAR G (YY + (YY/4))
SETVAR Jan1Weekday (2 + (((((C / 100) MOD 4) * 5) + G) MOD 7))
SETVAR WEEKNUMBER (HPDOY + (7 - HPday - 2) + Jan1Weekday - 2) / 7
showvar weeknumber

Greg Stigers

----- Original Message -----
From: "Andreas Schmidt" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, April 28, 2005 7:52 AM
Subject: Re: Week of the year calculation


> date.hpbin.sys "+%U"
> 17
>
> does the same!
>
> Best regards,
> Andreas Schmidt
> CSC Managed Services GmbH
> Global Infrastructure Services, Global Processing Engineering Services
> DuPont-Strasse 1, Room 1-346
> D-61352 Bad Homburg
> Germany
> Phone: +49 (0) 6172 / 87-2117 Fax -2195   DUCOM x951-2117
> eMail: [log in to unmask]
> HP e3000 Intranet Information at http://web1.cscbhg.dupont.com/web/hp3000/
> Unix Intranet Information at http://bhghpx12.bhg.dupont.com/

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2