System.Globalization Namespace DateTimeFormatInfo Class
Sets or retrieves the calendar to use for the current culture.
[ VB ]
public Property Calendar As Calendar
[ C# ]
public Calendar Calendar {get; set;}
[ C++ ]
public: __property Calendar* get_Calendar ( );
public: __property void set_Calendar ( Calendar* );
[ JScript ]
function get Calendar ( ) : Calendar;
public function set Calendar ( Calendar );
The Calendar indicating the calendar to use for the current culture. The default for InvariantInfo is the GregorianCalendar.
The Calendar property only accepts calendars that are valid for the current culture of the current thread. The CultureInfo.Calendar property specifies the default calendar for the culture and the CultureInfo.OptionalCalendars property specifies other calendars supported by the culture.
Changing the value of this property affects the following properties as well: MonthNames, AbbreviatedMonthNames, DayNames, AbbreviatedDayNames, CalendarWeekRule, FirstDayOfWeek, FullDateTimePattern, LongDatePattern, ShortDatePattern, YearMonthPattern, and MonthDayPattern.
For example, if the culture of the current thread is Japanese, this property accepts JapaneseCalendar, Localized GregorianCalendar, or USEnglish GregorianCalendar. When the JapaneseCalendar is used, the default long date pattern is "gg y'\x5e74'M'\x6708'd'\x65e5'". When the Localized GregorianCalendar, is used, the default long date pattern is "yyyy'\x5e74'M'\x6708'd'\x65e5'".
The below shows the Calendar and OptionalCalendars used for each of the available cultures.
Show me
DateTimeFormatInfo Members Calendar GregorianCalendar HebrewCalendar HijriCalendar JapaneseCalendar JulianCalendar KoreanCalendar ThaiBuddhistCalendar