HP3000-L Archives

June 1997, Week 3

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:
Denys Beauchemin <[log in to unmask]>
Reply To:
Date:
Mon, 16 Jun 1997 09:45:48 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (65 lines)
Art is right and John did give a simplistic answer to a very real problem.
 In the olden days, I used to write code for stuff like that.  For the week
of the year, it is important to know on which day of the week January 1
occurred.  Armed with that datum, and knowing how many days into the year a
date falls, it is easy to then assign that day to a proper week.

A difficulty arises when a company creates a production calendar.
 Sometimes this does not match the actual calendar.  I have worked at a
company where one year, we had 54 weeks and the following year, there where
only 51 weeks.  It depended on leap year and when Jan 1 was.

Kind regards,

Denys. . .

Denys Beauchemin
Hicomp America, Inc.
[log in to unmask]        www.hicomp.com
(800) 323-8863   (281) 288-7438  fax: (281) 355-6879



-----Original Message-----
From:   Art Bahrs [SMTP:[log in to unmask]]
Sent:   Monday, June 16, 1997 9:28 AM
To:     [log in to unmask]
Subject:

John & Steven,
   I don't think adding up the number of days (you could use the HP system
vars
to calc the number of days :) ) would work...for a business app.... Not
that I
would know anything about business apps hehehehe I am a Dilbert acolyte
after
all :)

See example below:

   On 14 Jan, 1997  you would have 14 days in the calendar year.

  Dividing by 7 would result in 2 with a remainder of 0.

 The problem is that 14 Jan, 1997 is in the *THIRD* calendar week of the
calendar year :(

I do remember a series of Library functions in FoxPro 1.1 back in '91 that
did
these kind of things... wonder if I have these floating around somewhere?

Art "I need my Dilbert Fix :)" Bahrs

>>> "John D. Alleyn-Day" <[log in to unmask]> 06/14/97 11:24pm >>>
Steven Clark wrote:

>I need a cobol routine to convert dates into a week of the year.

No you don't. All you need is a few lines of code.  Add up the days and
divide by seven.

John D. Alleyn-Day
Alleyn-Day International
408-286-6421   408-286-6474 (Fax)
[log in to unmask]       http://www.Alleyn-Day.com

ATOM RSS1 RSS2