System.Web.UI.WebControls.BaseCompareValidator.GetFullYear Method

Generates the four-digit year representation of the specified two-digit year.

Syntax

protected static int GetFullYear (int two_digit_year)

Parameters

two_digit_year
Documentation for this section has not yet been entered.

Returns

The four-digit year representation of the specified two-digit year.

Remarks

Use the BaseCompareValidator.GetFullYear(int) method to generate the four-digit year representation of the specified two-digit year. The four-digit year representation depends on the value of the BaseCompareValidator.CutoffYear property, which contains the maximum year that can be represented by a two-digit year in a 100-year range. For example, if the BaseCompareValidator.CutoffYear property contains the value 2029, the BaseCompareValidator.GetFullYear(int) method returns a year between 1930 and 2029. The two-digit year 30 is interpreted as 1930, while 29 is interpreted as 2029. You can change the maximum year that can be represented by a two-digit year by setting the System.Globalization.Calendar.TwoDigitYearMax property.

Note:

Because this method is static, you can use it without creating an instance of the class by qualifying the method name along with the class name--for example, BaseCompareValidator.GetFullYear.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0