Writing your own date window
In implementing the date window at the year 1930, Microsoft has attempted to satisfy the likely date requirements of most corporate Visual Basic applications. Despite the obvious good intentions of this solution, however, it’s only a second guess at your business functionality and cannot possibly be all things to all people.
In addition, the windowing technique employed by Visual Basic 5 is a fixed window, which never changes, as opposed to a more dynamic sliding-window technique, which in addition to moving with the times will permit a wider future or historic date range than the 100 years offered by the static system in some flavors of the algorithm. Consider some of the disadvantages of the fixed window:
-
Should your application need to process dates beyond a 100-year range, the fixed-window technique will not adequately calculate the desired date. In general, people are leading healthier lifestyles (discounting myself, of course!), and the average age expectancy is creeping up all the time. It’s not unreasonable to expect your applications to deal with records of people who exceed the age of 100. Consider how a fixed-window technique would affect your applications under these circumstances.
-
Without a doubt, any application using a fixed-window technique that is still around in a few decades (don’t you dare say, “Remember what they said in the 1970s”) will require manual code changes to continue functioning correctly. Suppose your particular Visual Basic application keeps going for another forty years. How will programmers in the year 2037 relate to Visual Basic? Will there still be programmers in the year 2037? Or will they have developed an organically engineered plug-in-person component by then?
-
If it’s only your processing that changes and not your data, any system that your fixed-window application supplies data to must make the same windowing assumptions that your application does. To a certain extent, this is also true of a sliding-window technique, but at least this disadvantage is more manageable under those conditions.
To be certain that your application will function as expected for the entire range of dates needed by your business, ideally you should develop your own sliding date window functions.