Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CultureInfo.Calendar Property

Gets the default calendar used by the culture.

[Visual Basic]
Public Overridable ReadOnly Property Calendar As Calendar
[C#]
public virtual Calendar Calendar {get;}
[C++]
public: __property virtual Calendar* get_Calendar();
[JScript]
public function get Calendar() : Calendar;

Property Value

A Calendar that represents the default calendar used by the culture.

Remarks

The user might choose to override some of the values associated with the current culture of Windows through Regional and Language Options (or Regional Options or Regional Settings) in Control Panel. For example, the user might choose to display the date in a different format or to use a currency other than the default for the culture.

If UseUserOverride is true and the specified culture matches the current culture of Windows, the CultureInfo uses those overrides, including user settings for the properties of the DateTimeFormatInfo instance returned by the DateTimeFormat property, the properties of the NumberFormatInfo instance returned by the NumberFormat property, and the properties of the CompareInfo instance returned by the CompareInfo property. If the user settings are incompatible with the culture associated with the CultureInfo (for example, if the selected calendar is not one of the OptionalCalendars), the results of the methods and the values of the properties are undefined.

Therefore, if UseUserOverride is true, the value of this property might be different from the default calendar used by the culture.

You can change the calendar used by the current CultureInfo by setting the Calendar property of DateTimeFormat, which is an instance of the DateTimeFormatInfo class. The new calendar must be one of the calendars listed in OptionalCalendars. DateTimeFormat also includes other properties that customize the date and time formatting associated with that Calendar.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

CultureInfo Class | CultureInfo Members | System.Globalization Namespace | Calendar | DateTimeFormat | DateTimeFormatInfo

Show:
© 2014 Microsoft. All rights reserved.