Show / Hide Table of Contents

Class GregorianCalendarInfo

Provides globalized calendar operations based on the GregorianCalendar.

Inheritance
System.Object
CalendarInfo
GregorianCalendarInfo
Inherited Members
CalendarInfo.DaysInWeek
CalendarInfo.FirstDayOfWeek
CalendarInfo.Compare(DateTime, DateTime)
CalendarInfo.CompareDays(DateTime, DateTime)
CalendarInfo.GetMonthDifference(DateTime, DateTime)
CalendarInfo.GetDecadeStart(DateTime)
CalendarInfo.GetDecadeEnd(DateTime)
CalendarInfo.GetDayOfWeek(DateTime)
CalendarInfo.GetFirstDayInYear(DateTime)
CalendarInfo.GetFirstDayInMonth(DateTime)
CalendarInfo.GetShortestDayName(Int32)
CalendarInfo.GetAbbreviatedMonthName(Int32)
CalendarInfo.DayToString(DateTime)
CalendarInfo.MonthAndYearToString(DateTime)
CalendarInfo.YearToString(DateTime)
CalendarInfo.DecadeToString(Int32, Int32)
CalendarInfo.DateToString(DateTime)
CalendarInfo.DateToLongString(DateTime)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Toolkit.dll
Syntax
public class GregorianCalendarInfo : CalendarInfo

Constructors

| Improve this Doc View Source

GregorianCalendarInfo()

Initializes a new instance of the GregorianCalendarInfo class.

Declaration
public GregorianCalendarInfo()
Remarks

Uses the most appropriate GregorianCalendar for CultureInfo.CurrentCulture.

| Improve this Doc View Source

GregorianCalendarInfo(CultureInfo)

Initializes a new instance of the GregorianCalendarInfo class.

Declaration
public GregorianCalendarInfo(CultureInfo culture)
Parameters
Type Name Description
System.Globalization.CultureInfo culture

The culture used to provide the GregorianCalendar and date formatting information.

Properties

| Improve this Doc View Source

DateFormatInfo

Gets the DateTimeFormatInfo to use for formatting.

Declaration
public override DateTimeFormatInfo DateFormatInfo { get; }
Property Value
Type Description
System.Globalization.DateTimeFormatInfo
Overrides
CalendarInfo.DateFormatInfo

Methods

| Improve this Doc View Source

AddDays(DateTime, Int32)

Returns a DateTime that is the specified number of days away from the specified DateTime.

Declaration
public override DateTime? AddDays(DateTime day, int days)
Parameters
Type Name Description
System.DateTime day

The DateTime to which to add days.

System.Int32 days

The number of days to add.

Returns
Type Description
System.Nullable<System.DateTime>

The DateTime that results from adding the specified number of days to the specified DateTime.

Overrides
CalendarInfo.AddDays(DateTime, Int32)
| Improve this Doc View Source

AddMonths(DateTime, Int32)

Returns a DateTime that is the specified number of months away from the specified DateTime.

Declaration
public override DateTime? AddMonths(DateTime day, int months)
Parameters
Type Name Description
System.DateTime day

The DateTime to which to add months.

System.Int32 months

The number of months to add.

Returns
Type Description
System.Nullable<System.DateTime>

The DateTime that results from adding the specified number of months to the specified DateTime.

Overrides
CalendarInfo.AddMonths(DateTime, Int32)
| Improve this Doc View Source

AddYears(DateTime, Int32)

Returns a DateTime that is the specified number of years away from the specified DateTime.

Declaration
public override DateTime? AddYears(DateTime day, int years)
Parameters
Type Name Description
System.DateTime day

The DateTime to which to add years.

System.Int32 years

The number of years to add.

Returns
Type Description
System.Nullable<System.DateTime>

The DateTime that results from adding the specified number of years to the specified DateTime.

Overrides
CalendarInfo.AddYears(DateTime, Int32)
  • Improve this Doc
  • View Source