Skip to content
Surf Wiki
Save to docs
general/units-of-time

From Surf Wiki (app.surf) — the open knowledge base

Date windowing

Method of software date conversion


Method of software date conversion

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 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 "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

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 typical example of COBOL code that establishes a fixed date window, used to figure the century for ordinary business dates. ::code[lang=cobolfree] 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. Some systems have environment variables 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. ## References ## References 1. Kruskopfs, Peter. ["Solving the Date Dilemma"](http://www.ibi.com/special/year2k/dilemma.html). *Information Builders*. 2. (2022-05-03). ["New base year support for 2-digit year date formats"](https://www.ibm.com/support/pages/new-base-year-support-2-digit-year-date-formats). *IBM*. 3. Alex Woodie. (2022-05-03). ["Announcement Day: IBM Lifts The Veil On IBM i 7.5 And 7.4 TR6"](https://www.itjungle.com/2022/05/03/announcement-day-ibm-lifts-the-veil-on-ibm-i-7-5-and-7-4-tr6/). 4. Healton, Gilbert. (2014-07-12). ["The Best of Dates, The Worst Of Dates"](http://x109.healton.net/y2k/yrexamples.html#_GoodGuys.Pivot). 5. Raymond B. Howard. "The Case for Windowing: Techniques That Buy 60 Years". *Year/2000 Journal*. 6. McNish, Larry. (2019-12-30). ["The Y2K Pivot Year Problem"](https://grumpyoldastronomer.com/y2kpivot.htm). 7. (2003). ["Chapter 1: Pivot Year"](https://www.appx.com/common/documents/manuals/appx/sysadmin/Chapter_1_Orientation_to_the_Manual/Chapter_1__Orientation_to_t.htm). 8. Livingston, Brian. (1999-02-09). ["COMPUTING Spot & fix Y2K problems in Windows 9x & NT"](http://edition.cnn.com/TECH/computing/9902/09/testy2k.idg/index.html). 9. Bridis, Ted. (1999-03-16). ["Temporary Y2K fix may last only a generation"](https://www.onlineathens.com/stories/031699/new_y2k.shtml). ::callout[type=info title="Wikipedia Source"] This article was imported from [Wikipedia](https://en.wikipedia.org/wiki/Date_windowing) and is available under the [Creative Commons Attribution-ShareAlike 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/). Content has been adapted to SurfDoc format. Original contributors can be found on the [article history page](https://en.wikipedia.org/wiki/Date_windowing?action=history). ::
Want to explore this topic further?

Ask Mako anything about Date windowing — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report