System::Globalization::Calendar class

Calendar class

Calendar which defines how the dates are handled, calculated, formatted, etc. Setter operations are only enabled on non-read-only objects. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class Calendar : public System::ICloneable

Methods

MethodDescription
virtual AddDays(DateTime, int) constAdds days to time point.
virtual AddHours(DateTime, int) constAdds hours to time point.
virtual AddMilliseconds(DateTime, double) constAdds milliseconds to time point.
virtual AddMinutes(DateTime, int) constAdds minutes to time point.
virtual AddMonths(DateTime, int) constAdds months to time point.
virtual AddSeconds(DateTime, int) constAdds seconds to time point.
virtual AddWeeks(DateTime, int) constAdds weeks to time point.
virtual AddYears(DateTime, int) constAdds years to time point.
Calendar(const Calendar&)RTTI information.
virtual get_AlgorithmType() constGets algorithm type.
get_CurrentEra() constGets index of current era.
get_CurrentEraValue() constGets value of current era.
virtual get_Eras() constGets list of eras existing in calendar.
virtual get_ID() constGets calendar identifier.
get_IsReadOnly() constChecks if the calendar is read only.
virtual get_MaxSupportedDateTime() constMaximal point in time that is supported by the calendar.
virtual get_MinSupportedDateTime() constMinimal point in time that is supported by the calendar.
virtual get_TwoDigitYearMax() constGets the last year that can be represented by a 2-digit.
virtual GetDayOfMonth(DateTime) constGets day of month for the specified time point.
virtual GetDayOfWeek(DateTime) constGets day of week for the specified time point.
virtual GetDayOfYear(DateTime) constGets day of year for the specified time point.
virtual GetDaysInMonth(int, int) constGets number of days in specific month.
virtual GetDaysInMonth(int, int, int) constGets number of days in specific month.
virtual GetDaysInYear(int) constGets number of days in specific year.
virtual GetDaysInYear(int, int) constGets number of days in specific year.
virtual GetEra(DateTime) constGets era for the specified time point.
virtual GetHour(DateTime) constGets hours for the specified time point.
virtual GetLeapMonth(int) constGets the leap month for the specified year.
virtual GetLeapMonth(int, int) constGets the leap month for the specified year.
virtual GetMilliseconds(DateTime) constGets milliseconds for the specified time point.
virtual GetMinute(DateTime) constGets minutes for the specified time point.
virtual GetMonth(DateTime) constGets month for the specified time point.
virtual GetMonthsInYear(int) constGets number of months in the specified year.
virtual GetMonthsInYear(int, int) constGets number of months in the specified year.
virtual GetSecond(DateTime) constGets seconds for the specified time point.
virtual GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) constGets week of the year for the specified time point.
virtual GetYear(DateTime) constGets year for the specified time point.
virtual IsLeapDay(int, int, int) constChecks if the day is leap.
virtual IsLeapDay(int, int, int, int) constChecks if the day is leap.
virtual IsLeapMonth(int, int) constChecks if the month is leap.
virtual IsLeapMonth(int, int, int) constChecks if the month is leap.
virtual IsLeapYear(int) constChecks if the year is leap.
virtual IsLeapYear(int, int) constChecks if the year is leap.
IsValidDay(int, int, int, int) constChecks year, month, day and era values.
operator=(const Calendar&)
static ReadOnly(const CalendarPtr&)Gets read only version of calendar.
virtual set_TwoDigitYearMax(int)Sets the last year that can be represented by a 2-digit.
virtual ToDateTime(int, int, int, int, int, int, int) constConstructs DateTime object from components.
virtual ToDateTime(int, int, int, int, int, int, int, int) constConstructs DateTime object from components.
virtual ToFourDigitYear(int) constConverts the year to 4-digit year using TwoDigitYearMax property.

See Also