HP3000-L Archives

January 2003, Week 1

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:
Michael Berkowitz <[log in to unmask]>
Reply To:
Michael Berkowitz <[log in to unmask]>
Date:
Tue, 7 Jan 2003 12:14:53 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
Tom Emerson writes




On Tuesday 07 January 2003 9:23 am, Michael Anderson wrote:
>
> Without thinking about it, so I could be mistaken, this is where I
> would start.
>
> :SETVAR MYWEEKOFYEAR (HPDOY / 7) + 1
> :ECHO !MYWEEKOFYEAR
>
> 2
>
> This logic should get you through this year. However, it's probably
> more reasonable to make the '+ 1' into a variable, that is set to 1 or 0
> depending on if the 7th of Jan is part of the 1st week of the year or
> not.

The thing that mucks this up is the determination of "week 1" -- there is a
business rule or two that might be a cause of conflict.  One rule I've heard
is the first week of the year is the "first week to contain a ..." [monday,
friday, sunday -- pick one...] an alternative rule is that the first week is
the first sunday-to-saturday stretch with 4 or more january days in it, so
if
the week "begins" on a thursday, friday, or saturday, it really is/was "part
of last year"...
-----------------------------------------------------
A variation on that rule that we use at Guess? is that is up to 9 day week.
If Jan 1 is a Saturday or Sunday, week 1 is 9 or 8 days long.

Mike Berkowitz
Guess? Inc.

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

ATOM RSS1 RSS2