HP3000-L Archives

January 2003, Week 2

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:
Friedrich Harasleben <[log in to unmask]>
Reply To:
Friedrich Harasleben <[log in to unmask]>
Date:
Wed, 8 Jan 2003 01:47:04 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (80 lines)
 There may be 1 - 53 weeks per year.

The official ISO standard (no idea if this is also a standard for US) says
the following:

- a week that contains days of 2 different years belongs to the year of
which it contains more days. Therefor it will be week 1 of the following
year, if thursday belongs to the following year. (Its thursday, because IS
8601 specifys monday as the first day of week).

- there will be a week 53, if a leap year starts with thursday (e.g the 53
weeks of 1976 started on 29. Dec. 1975 and ended on 2. Jab. 1977).

I do not want to start discussions of "what is the first day of week" etc.
Its just the official standard.

Functions to calculate week numbers should be part of the date intrinsics of
the HP3000

regards
Friedrich

Michael Anderson schrieb:

> Hey Tony, long time!
>
> 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.
>
> I donno,
>
> --
> Michael Anderson
> Spring Independent School District
> 16717 Ella Boulevard
> Houston, Texas 77090-4299
> office: 281.586.1105
> fax: 281.586.1187
> -
>
> >>> Tony Gil <[log in to unmask]> 01/07/03 10:47AM >>>
> All,
>
> Has anyone written an MPE script which calculates the week number of
> the
> year using the current day and HPDAY (or any other system variable)?
> For
> example, today would be the second week of the current year, since the
> first
> week ended on 1/4/03.
>
> Thanks in advance!
>
> Tony Gil
> Sr. Programmer Analyst
> Centis Inc.
> 205 S. Puente Street
> Brea, CA. 92821
> v:   714-626-2406
> f:   714-441-4536
> e: [log in to unmask] <mailto:[log in to unmask]>
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

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

ATOM RSS1 RSS2