Calendar Constructors
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.
Calendar() |
Creates a Calendar object and initializes it to the current DateTime. |
Calendar(IIterable<String>) |
Creates a Calendar object that is initialized with a language list. |
Calendar(IIterable<String>, String, String) |
Creates a Calendar object that is initialized with a language list, calendar, and clock. |
Calendar(IIterable<String>, String, String, String) |
Creates a Calendar object that is initialized with a language list, calendar, clock, and time zone. |
public:
Calendar();
Calendar();
public Calendar();
function Calendar()
Public Sub New ()
See also
- Calendar(IIterable<String>, String, String)
- Calendar, date, and time controls
- Calendar sample
- Date and time formatting sample
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
public:
Calendar(IIterable<Platform::String ^> ^ languages);
Calendar(IIterable<winrt::hstring> const& languages);
public Calendar(IEnumerable<string> languages);
function Calendar(languages)
Public Sub New (languages As IEnumerable(Of String))
Parameters
The list of language identifiers, in priority order, that represents the choice of languages. These are used for resolving patterns to strings.
Remarks
Language tags support the Unicode extensions "ca-" and "nu-". (See Unicode Key/Type Definitions.) Note that these extensions can affect the calendar used by Calendar objects.
See also
- Calendar(IIterable<String>, String, String)
- Unicode Key/Type Definitions
- Calendar, date, and time controls
- Calendar sample
- Date and time formatting sample
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
public:
Calendar(IIterable<Platform::String ^> ^ languages, Platform::String ^ calendar, Platform::String ^ clock);
Calendar(IIterable<winrt::hstring> const& languages, winrt::hstring const& calendar, winrt::hstring const& clock);
public Calendar(IEnumerable<string> languages, string calendar, string clock);
function Calendar(languages, calendar, clock)
Public Sub New (languages As IEnumerable(Of String), calendar As String, clock As String)
Parameters
The list of language identifiers, in priority order, representing the choice of languages. These are used for resolving patterns to strings. See Remarks for Calendar.
- calendar
-
String
Platform::String
winrt::hstring
The calendar identifier to use.
- clock
-
String
Platform::String
winrt::hstring
The clock identifier to use.
See also
- Unicode Key/Type Definitions
- Calendar, date, and time controls
- Calendar sample
- Date and time formatting sample
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
public:
Calendar(IIterable<Platform::String ^> ^ languages, Platform::String ^ calendar, Platform::String ^ clock, Platform::String ^ timeZoneId);
Calendar(IIterable<winrt::hstring> const& languages, winrt::hstring const& calendar, winrt::hstring const& clock, winrt::hstring const& timeZoneId);
public Calendar(IEnumerable<string> languages, string calendar, string clock, string timeZoneId);
function Calendar(languages, calendar, clock, timeZoneId)
Public Sub New (languages As IEnumerable(Of String), calendar As String, clock As String, timeZoneId As String)
Parameters
The list of language identifiers, in priority order, representing the choice of languages. These are used for resolving patterns to strings. See Remarks for Calendar.
- calendar
-
String
Platform::String
winrt::hstring
The calendar identifier to use.
- clock
-
String
Platform::String
winrt::hstring
The clock identifier to use.
- timeZoneId
-
String
Platform::String
winrt::hstring
An identifier from the IANA Time Zone Database which identifies the time zone that should be used (for example, "America/Los_Angeles" for Pacific Time).
See also
- Calendar(IIterable<String>)
- Calendar(IIterable<String>, String, String)
- Unicode Key/Type Definitions
Applies to
WinRT Build 26100 and other versions
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |