HOME

TheInfoList



OR:

Date windowing is a method by which dates with two-digit years are converted to and from dates with four-digit years. The year at which the century changes is called the pivot year of the date window. Date windowing was one of several techniques used to resolve the
year 2000 problem The year 2000 problem, also known as the Y2K problem, Y2K scare, millennium bug, Y2K bug, Y2K glitch, Y2K error, or simply Y2K refers to potential computer errors related to the formatting and storage of calendar data for dates in and after ...
in legacy computer systems.


Reasoning

For organizations and institutions with data that is only decades old, a "date windowing" solution was considered easier and more economical than the massive conversions and testing required when converting two-digit years into four-digit years.


Windowing methods

There are three primary methods used to determine the date window: * Fixed pivot year: simplest to code, works for most business dates. * Sliding pivot year: determined by subtracting some constant from the current year, typically used for birth dates. * Closest date: Three different interpretations (last century, this century, and next century) are compared to the current date, and the closest date is chosen from the three.


FOCUS

Information Builders's
FOCUS Focus, or its plural form foci may refer to: Arts * Focus or Focus Festival, former name of the Adelaide Fringe arts festival in South Australia Film *''Focus'', a 1962 TV film starring James Whitmore * ''Focus'' (2001 film), a 2001 film based ...
"Century Aware" implementation allowed the user to focus on field-specific and file-specific settings. This flexibility gave the best of all three major mechanisms: A school could have file RecentDonors set a field named BirthDate to use ::DEFCENT=19 YRTHRESH=31, covering those born 1931-2030. Those born 2031 are not likely to be donating before 2049, by which time those born 1931 would be 118 years old, and unlikely current donors. DEFCENT and YRTHRESH for a file containing present students and recent graduates would use different values.


Examples

Below is a simple example of fixed date windowing COBOL code, often used to figure the century for ordinary business dates. IF RECEIPT-DATE-YEAR >= 60 MOVE 19 TO RECEIPT-DATE-CENTURY ELSE MOVE 20 TO RECEIPT-DATE-CENTURY END-IF. The above code establishes a fixed date window of 1960 through 2059. It assumes that none of the receipt dates are before 1960, and should work until January 1, 2060.
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
and
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
systems have
environment variable An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP envi ...
s that set the fixed pivot year for the system. Any year after the pivot year will belong to this century (the 21st century), and any year before or equal to the pivot year will belong to last century (the 20th century). Some products, such as Microsoft Excel 95 used a window of years 1920–2019 which had the potential to encounter a windowing bug reoccurring only 20 years after the year 2000 problem had been addressed. The IBM i operating system uses a window of 1940-2039 for date formats with a two-digit year. In the 7.5 release of the operating system, an option was added to use a window of 1970-2069 instead.


See also

* Serial number arithmetic, a form of windowing for sequential counters


References

{{Reflist, 2, refs= {{Cite web , url=http://x109.healton.net/y2k/yrexamples.html#_GoodGuys.Pivot , title=The Best of Dates, The Worst Of Dates , last=Healton , first=Gilbert , date=2014-07-12 , format=html , archive-url=https://web.archive.org/web/20200213231310/http://x109.healton.net/y2k/yrexamples.html#_GoodGuys.Pivot.Intro , archive-date=2020-02-13 , access-date=2020-02-13 , quote=A pivot year, also known as date windowing, takes a two-digit year and expands it to determine which century the year is in. Typically the year is converted to either a full four-digit year or into the year-1900 format, as appropriate to the application at hand. , df=dmy-all {{cite journal , author=Raymond B. Howard, title=The Case for Windowing: Techniques That Buy 60 Years, journal=Year/2000 Journal , issue=Mar/Apr 1998 , quote=Windowing is a long-term fix that should keep legacy systems working fine until the software is redesigned... {{Cite web , url=https://grumpyoldastronomer.com/y2kpivot.htm , title=The Y2K Pivot Year Problem , last=McNish , first=Larry , date=2019-12-30 , archive-url=https://web.archive.org/web/20200115130255/https://grumpyoldastronomer.com/y2kpivot.htm , archive-date=2020-01-15 , access-date=2020-02-13 , quote=The choice of the actual pivot year was made by companies based on their historical records. It was in no way an industry standard, nor was this approach in any way professionally recommended. But it would work for a while. , df=dmy-all {{Cite web , url=https://www.appx.com/common/documents/manuals/appx/sysadmin/Chapter_1_Orientation_to_the_Manual/Chapter_1__Orientation_to_t.htm , title=Chapter 1: Pivot Year , date=2003 , website=APPX Software, Inc. , format=html , archive-url=https://web.archive.org/web/20120922230258/https://www.appx.com/common/documents/manuals/appx/sysadmin/Chapter_1_Orientation_to_the_Manual/Chapter_1__Orientation_to_t.htm , archive-date=2012-09-22 , access-date=2020-02-13 , quote=By defining a pivot year, you direct APPX to determine what century a particular year belongs to. For example, if the pivot year is set to 35, then any date field with a year greater than 35 will be assumed by APPX to have a century value of 19. Any date field with a year less than or equal to the pivot year will be assumed by APPX to have a century value of 20. , df=dmy-all {{Cite web , url=http://edition.cnn.com/TECH/computing/9902/09/testy2k.idg/index.html , title=COMPUTING Spot & fix Y2K problems in Windows 9x & NT , last=Livingston , first=Brian , date=1999-02-09 , website=
CNN CNN (Cable News Network) is a multinational cable news channel headquartered in Atlanta, Georgia, U.S. Founded in 1980 by American media proprietor Ted Turner and Reese Schonfeld as a 24-hour cable news channel, and presently owned by ...
, format=html , archive-url=https://web.archive.org/web/20010517090846/http://edition.cnn.com/TECH/computing/9902/09/testy2k.idg/index.html , archive-date=2001-05-17 , access-date=2020-02-13 , quote=The other common behavior that Windows users will experience involves dates in spreadsheet programs such as Microsoft Excel, Lotus 1-2-3, and Corel Quattro Pro. If you have typed all your dates with four-digit years (such as 1/1/1999 and 1/1/2000), you should be fine. But if you have typed two-digit years (such as 1/1/29), you may be surprised at the way different programs handle the date. , df=dmy-all
{{Cite web , url=https://www.onlineathens.com/stories/031699/new_y2k.shtml , title=Temporary Y2K fix may last only a generation , last=Bridis , first=Ted , date=1999-03-16 , website=Online Athens , format=html , archive-url=https://web.archive.org/web/20160304074157/https://www.onlineathens.com/stories/031699/new_y2k.shtml , archive-date=2016-03-04 , access-date=2020-02-13 , quote=Using windowing, programmers instruct software to guess the century for dates that fall within a specific "window" of time, such as the next three decades. The computer interprets the year based on a future so-called hinge date, or pivot, that programmers choose arbitrarily , df=dmy-all Units of time