YearFormat 枚举 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定 DateTimeFormatter 对象中年份的预期格式。
public enum class YearFormat
	/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class YearFormat
	[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum YearFormat
	var value = Windows.Globalization.DateTimeFormatting.YearFormat.none
	Public Enum YearFormat
		- 继承
 - 
				YearFormat
 
- 属性
 
Windows 要求
| 设备系列 | 
					 
							Windows 10 (在 10.0.10240.0 中引入) 
				 | 
			
| API contract | 
					 
							Windows.Foundation.UniversalApiContract (在 v1.0 中引入) 
				 | 
			
字段
| 名称 | 值 | 说明 | 
|---|---|---|
| Abbreviated | 2 | 显示年份 (的缩写版本,例如,“11”表示公历 2011) 。  | 
			
| Default | 1 | 以最自然的方式显示年份。 它可以是缩写或完整,具体取决于上下文,例如使用的语言或日历。  | 
			
| Full | 3 | 显示整个年份 (例如,Gregorian 2011) 的“2011”。  | 
			
| None | 0 | 不显示年份。  |