[Mono-list] Bug in M$'s BaseCompareValidator class

A Rafael D Teixeira rafaelteixeirabr@hotmail.com
Tue, 30 Oct 2001 11:15:38 -0200

That is not a bug. That is what is called a 'windowing' a short year 
representation. What it means is:

if you enter 1/1/59 => 01/01/2059
if you enter 1/1/60 => 01/01/1960

We say the time-window of a shortdate representation is 1960-2059.
It is a setting. In DOS it was a fixed window of 1930-2029. In MS Windows 95 
and up there´s a registry setting that can adjust the window. That function 
returns a full year (2059), so that when nearing a century boundary it can 
be fully adjusted (100 years from now we will need it to be 2159).

Rafael Teixeira
Brazilian Developer

>From: "Gaurav Vaish" <gvaish@iitk.ac.in>
>To: <mono-list@ximian.com>
>Subject: [Mono-list] Bug in M$'s BaseCompareValidator class
>Date: Tue, 30 Oct 2001 09:30:24 +0530
>See the code attached.
>     The property CutoffYear has the following documentation:
>protected static int CutoffYear {get;}
>Property Value
>The maximum value that can be represented by a two digit year.
>The maximum value depends on the system setttings.
>     But the result that I get using the test code I wrote is:
>CutoffYear: 2059
>FullYear  : 2080
>     I never knew that a two digit number can be so long ("2059")!
>Gaurav Vaish
><< BaseCompareValidatorTest.cs >>

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp