EastAsianLunisolarCalendar.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 in a set operation is less than 99 or greater than the maximum supported year in the current calendar.

注解

此属性允许将两位数的年份正确翻译为四位数年份。This property allows a 2-digit year to be properly translated to a 4-digit year. 例如, 在公历中, 如果将此属性设置为 2029, 则100年范围是从1930到2029。For example, in the Gregorian calendar, if this property is set to 2029, the 100-year range is from 1930 to 2029. 因此, 两位数值30被解释为 1930, 而两位数字的值29则解释为2029。Therefore, a 2-digit value of 30 is interpreted as 1930, while a 2-digit value of 29 is interpreted as 2029.

此属性的初始值派生自控制面板的 "区域和语言选项" 部分中的设置。The initial value of this property is derived from the settings in the regional and language options portion of Control Panel. 但是, 该信息在的生命周期AppDomain内可能会更改。However, that information can change during the life of the AppDomain. EastAsianLunisolarCalendar类不会自动检测系统设置中的更改。The EastAsianLunisolarCalendar class does not detect changes in the system settings automatically.

适用于