Share via


CalendarIdentifiers.Gregorian 屬性

定義

取得西曆的識別碼。

public:
 static property Platform::String ^ Gregorian { Platform::String ^ get(); };
static winrt::hstring Gregorian();
public static string Gregorian { get; }
var string = CalendarIdentifiers.gregorian;
Public Shared ReadOnly Property Gregorian As String

屬性值

String

Platform::String

winrt::hstring

字串 「GregorianCalendar」,這是西曆的識別碼。

備註

傳回的識別碼適合用於需要行事曆識別碼的任何位置。

西曆可辨識兩個紀元:B.C. 或 B.C.E.,以及 A.D. 或 C.E。西曆系統的這個實作只會辨識 A.D.) 目前的紀元 (。

西曆中的閏年會定義為一年,由四個平均除法,除非是 100 除。 不過,由 400 除的年份是閏年。 例如,1900 年不是閏年,而是 2000 年。 一般年份有 365 天,而閏年有 366 天。

西曆有 12 個月,每個月 28 到 31 天:1 月 (31 天) ,2 月 (28 或 29 天) , 3 月 (31 天) ,4 月 (30 天) ,5 月 (31 天) ,6 月 (30 天) ,7 月 (3) 1 天,8 月 (31 天) ,9 月 (30 天) , 10 月 (31 日) 、11 月 (30 天) ,以及 12 月 (31 日) 。 2 月在閏年期間有 29 天,一般年份有 28 天。

周名日和月份名稱的西曆字串會針對所有支援的地區設定進行當地語系化,因此會以對應至行事曆物件的 ResolvedLanguage 屬性的語言顯示。

適用於

另請參閱