Browse Prior Art Database

Derivation of Manufacturing Schedule Weeks

IP.com Disclosure Number: IPCOM000123822D
Original Publication Date: 1999-May-01
Included in the Prior Art Database: 2005-Apr-05
Document File: 5 page(s) / 169K

Publishing Venue

IBM

Related People

Cohen, JM: AUTHOR

Abstract

Disclosed is an algorithm for deriving the manufacturing schedule week (four-digit number in the format of YYWW where YY indicates the year and WW indicates the week) of a given date.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 34% of the total text.

Derivation of Manufacturing Schedule Weeks

   Disclosed is an algorithm for deriving the manufacturing
schedule week (four-digit number in the format of YYWW where YY
indicates the year and WW indicates the week) of a given date.

   Schedule weeks traditionally start on a Sunday and end on a
Saturday, with the first week of the year being the earliest week to
contain four days.  This means that January 1 must be on a Sunday,
Monday, Tuesday, or Wednesday to be in the first schedule week of the
year.  For example, week 9601 started on December 31, 1995, since the
week contained six days (January 1-6) within 1996.  In contrast, week
9801 started on January 4, 1998, since the previous week contained
only three days (January 1-3) in 1998.  In this case, January 1-3,
1998 would be in schedule week 9753.

   Most years contain 52 schedule weeks.   Once every seven
non-leap years, however, and twice every seven leap years, there will
be 53 schedule weeks in the year (such as 1992 and 1997).  Since a
non-leap year has 52 weeks and one day, only years that start on
Wednesday will have a week 53.  Since leap years have 52 weeks and
two days, leap years that start on a Tuesday or Wednesday will have a
week 53.

   January 4 is always in the first schedule week of the year
and December 28 is always in the last schedule week.  January 1-3
may be in the last week of the previous year (1993, 1994) and
December 29-31 may be in the first week of the next year (1995,
1996).

   Algorithm

   This seven-step algorithm starts by deriving an approximate
schedule week and then modifies it to handle various special cases.
Examples shown are January 1, 1993 and December 28, 1997.

   Step 1 - Determine the day of the week

   Determine the day of the week for January 1, December 31,
and the target date.
  January 1, 1993 was a Friday; December 28, 1993 was a Tuesday;
  December 31,  1993 was a Friday.  January 1, 1997 was a
  Wednesday;
  December 28, 1997 was a Sunday; December 31, 1997 was a Sunday.

   Step 2 - Calculate the approximate schedule week

   Determine the approximate schedule week for the target
date by taking the  day of the year of the target date and dividing
by seven.  Round this number up so the result will be an integer
between 1 and 53.  Next, assume that the schedule week is in the same
year as the target date.
  Schedule Week = (Day Of Year + 6) / 7
  Schedule Week (Jan. 1, 1993) = (1 + 6) / 7 = 1   (9301)
  Schedule Week (Dec. 28, 1997) = (362+6) / 7 = 52 (9752)

   Step 3 - If January 1 is in week one, add one to the
schedule week if the date is earlier in the week than January 1

   If January 1 is in week one and the target date is earlier
in the week, then increment the schedule by one.  For example, if
January 1 is a Wednesday and January 5 is a Sunday, then January 5
should be in schedule week two, not one.

   January 1, 1993 was on a Friday, so it was not in week
1, so the schedule week for Jan...