Export (0) Print
Expand All

BaseCompareValidator.GetFullYear Method

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

[Visual Basic]
Protected Shared Function GetFullYear( _
   ByVal shortYear As Integer _
) As Integer
[C#]
protected static int GetFullYear(
 int shortYear
);
[C++]
protected: static int GetFullYear(
 int shortYear
);
[JScript]
protected static function GetFullYear(
   shortYear : int
) : int;

Parameters

shortYear
A two-digit year.

Return Value

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

Remarks

Use the GetFullYear 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 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 CutoffYear property contains the value 2029, the GetFullYear 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 Calendar.TwoDigitYearMax property.

Note   Since this method is static (Shared in Visual Basic), 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

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

BaseCompareValidator Class | BaseCompareValidator Members | System.Web.UI.WebControls Namespace | CutoffYear | System.Globalization.Calendar | Calendar.TwoDigitYearMax

Show:
© 2014 Microsoft