JapaneseCalendar.TwoDigitYearMax 属性

定义

获取或设置可以用两位数年份表示的 100 年范围内的最后一年。Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

public:
 virtual property int TwoDigitYearMax { int get(); void set(int value); };
public override int TwoDigitYearMax { get; set; }
member this.TwoDigitYearMax : int with get, set
Public Overrides Property TwoDigitYearMax As Integer

属性值

可以用两位数年份表示的 100 年范围内的最后一年。The last year of a 100-year range that can be represented by a 2-digit year.

异常

为设置操作指定的值小于 99。The value specified in a set operation is less than 99.

-or- 为 Set 操作指定的值大于 8011(或 MaxSupportedDateTime.Year)。The value specified in a set operation is greater than 8011 (or MaxSupportedDateTime.Year).

在设置操作中,当前实例是只读的。In a set operation, the current instance is read-only.

注解

此属性实现 Calendar.TwoDigitYearMaxThis property implements Calendar.TwoDigitYearMax.

由于日本日历中的年份通常小于四位数, 因此此实现默认情况下返回 99, 并且不影响的返回值ToFourDigitYearBecause the year in the Japanese calendar is typically less than four digits long, this implementation returns 99 by default and does not affect the return value of ToFourDigitYear.

适用于

另请参阅