CalendarIdentifiers Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains the calendar identifiers for the supported calendars, as static properties.
public ref class CalendarIdentifiers abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CalendarIdentifiers final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class CalendarIdentifiers
Public Class CalendarIdentifiers
- Inheritance
- Attributes
Windows requirements
| Device family |
Windows 10 (introduced in 10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Examples
The following example shows how to specify a Calendar system using the ChangeCalendarSystem method.
winrt::Windows::Globalization::Calendar calendar;
calendar.ChangeCalendarSystem(winrt::Windows::Globalization::CalendarIdentifiers::Gregorian);
// Perform Gregorian calendar calculations.
...
calendar.ChangeCalendarSystem(winrt::Windows::Globalization::CalendarIdentifiers::Hebrew);
// Perform Hebrew calendar calculations.
...
Remarks
Version history
| Windows version | SDK version | Value added |
|---|---|---|
| 1607 | 14393 | ChineseLunar |
| 1607 | 14393 | JapaneseLunar |
| 1607 | 14393 | KoreanLunar |
| 1607 | 14393 | TaiwanLunar |
| 1607 | 14393 | VietnameseLunar |
Properties
| ChineseLunar |
Gets the identifier for the Chinese lunisolar calendar. |
| Gregorian |
Gets the identifier for the Gregorian calendar. |
| Hebrew |
Gets the identifier for the Hebrew calendar. |
| Hijri |
Gets the identifier for the Hijri calendar. |
| Japanese |
Gets the identifier for the Japanese calendar. |
| JapaneseLunar |
This name is reserved for a future update. Do not access or use this property in your code, as accessing the property will result in errors or exceptions being thrown. |
| Julian |
Gets the identifier for the Julian calendar. |
| Korean |
Gets the identifier for the Korean calendar. |
| KoreanLunar |
This name is reserved for a future update. Do not access or use this property in your code, as accessing the property will result in errors or exceptions being thrown. |
| Persian |
Gets the identifier for the Persian calendar. |
| Taiwan |
Gets the identifier for the Taiwan calendar. |
| TaiwanLunar |
This name is reserved for a future update. Do not access or use this property in your code, as accessing the property will result in errors or exceptions being thrown. |
| Thai |
Gets the identifier for the Thai calendar. |
| UmAlQura |
Gets the identifier for the Um Al-Qura calendar. |
| VietnameseLunar |
This name is reserved for a future update. Do not access or use this property in your code, as accessing the property will result in errors or exceptions being thrown. |