DateTimeFormatter.IncludeYear 属性

定义

获取模板中的 YearFormat

public:
 property YearFormat IncludeYear { YearFormat get(); };
YearFormat IncludeYear();
public YearFormat IncludeYear { get; }
var yearFormat = dateTimeFormatter.includeYear;
Public ReadOnly Property IncludeYear As YearFormat

属性值

指定是否包含年份。 如果是,则此格式指定模板中年份的格式。

适用于