System.Globalization.DateTimeFormatInfo.Calendar Property

Gets or sets the calendar to use for the current culture.

Syntax

public Calendar Calendar { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The DateTimeFormatInfo.Calendar property accepts only calendars that are valid for the culture that is associated with the System.Globalization.DateTimeFormatInfo object. The CultureInfo.OptionalCalendars property specifies the calendars that can be used by a particular culture, and the CultureInfo.Calendar property specifies the default calendar for the culture.

Changing the value of this property affects the following properties as well: DateTimeFormatInfo.MonthNames, DateTimeFormatInfo.AbbreviatedMonthNames, DateTimeFormatInfo.DayNames, DateTimeFormatInfo.AbbreviatedDayNames, DateTimeFormatInfo.CalendarWeekRule, DateTimeFormatInfo.FirstDayOfWeek, DateTimeFormatInfo.FullDateTimePattern, DateTimeFormatInfo.LongDatePattern, DateTimeFormatInfo.ShortDatePattern, DateTimeFormatInfo.YearMonthPattern, and DateTimeFormatInfo.MonthDayPattern.

For example, if the culture of the current thread is Japanese, this property accepts System.Globalization.JapaneseCalendar, GregorianCalendarTypes.Localized System.Globalization.GregorianCalendar, or GregorianCalendarTypes.USEnglish System.Globalization.GregorianCalendar. When the System.Globalization.JapaneseCalendar is used, the default long date specifier is "gg y'\x5e74'M'\x6708'd'\x65e5'". When the GregorianCalendarTypes.Localized System.Globalization.GregorianCalendar, is used, the default long date specifier is "yyyy'\x5e74'M'\x6708'd'\x65e5'".

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0