JapaneseCalendar.ToFourDigitYear Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Converts the specified year to a four-digit year by using the TwoDigitYearMax property to determine the appropriate century.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- year
- Type: System.Int32
An integer (usually two digits) that represents the year to convert.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | year is outside the range supported by the calendar. |
This method implements Calendar.ToFourDigitYear.
Because the year in the Japanese calendar is typically less than four digits long, this implementation always returns the value of the year parameter unchanged if year is a two-digit value. If the application supplies a four-digit value, or if it supplies a zero or a negative value, ToFourDigitYear throws an exception.