Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1870 lines (1698 sloc) 117 KB
<Type Name="GregorianCalendar" FullName="System.Globalization.GregorianCalendar">
<TypeSignature Language="C#" Value="public class GregorianCalendar : System.Globalization.Calendar" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit GregorianCalendar extends System.Globalization.Calendar" />
<TypeSignature Language="DocId" Value="T:System.Globalization.GregorianCalendar" />
<TypeSignature Language="VB.NET" Value="Public Class GregorianCalendar&#xA;Inherits Calendar" />
<TypeSignature Language="C++ CLI" Value="public ref class GregorianCalendar : System::Globalization::Calendar" />
<TypeSignature Language="F#" Value="type GregorianCalendar = class&#xA; inherit Calendar" />
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Globalization.Calendar</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the Gregorian calendar.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Gregorian calendar recognizes two eras: B.C. or B.C.E., and A.D. or C.E. This implementation of the <xref:System.Globalization.GregorianCalendar> class recognizes only the current era (A.D. or C.E.).
> [!NOTE]
> For information about using the <xref:System.Globalization.GregorianCalendar> class and the other calendar classes in the .NET Framework, see [Working with Calendars](~/docs/standard/datetime/working-with-calendars.md).
A leap year in the Gregorian calendar is defined as a year that is evenly divisible by 4, unless it is divisible by 100. However, years that are divisible by 400 are leap years. For example, the year 1900 was not a leap year, but the year 2000 was. A common year has 365 days and a leap year has 366 days.
The Gregorian calendar has 12 months with 28 to 31 days each: January (31 days), February (28 or 29 days), March (31 days), April (30 days), May (31 days), June (30 days), July (31 days), August (31 days), September (30 days), October (31 days), November (30 days), and December (31 days). February has 29 days during leap years and 28 during common years.
> [!IMPORTANT]
> By default, all <xref:System.DateTime> and <xref:System.DateTimeOffset> values express dates and times in the Gregorian calendar.
The Gregorian calendar was developed as a replacement for the Julian calendar (which is represented by the <xref:System.Globalization.JulianCalendar> class) and was first introduced in a small number of cultures on October 15, 1582. When working with historic dates that precede a culture's adoption of the Gregorian calendar, you should use the original calendar if it is available in the .NET Framework. For example, Denmark changed from the Julian calendar to the Gregorian calendar on February 19 (in the Julian calendar) or March 1 (in the Gregorian calendar) of 1700. In this case, for dates before the adoption of the Gregorian calendar, you should use the Julian calendar. However, note that no culture offers intrinsic support for the <xref:System.Globalization.JulianCalendar> class. You must use the <xref:System.Globalization.JulianCalendar> class as a standalone calendar. For more information, see [Working with calendars](~/docs/standard/datetime/working-with-calendars.md).
The following example illustrates that February 18, 1700 in the Julian calendar, which is the last day the Julian calendar was officially used in Denmark, is one day earlier than March 1, 1700 in the Gregorian calendar.
[!code-csharp[System.Globalization.GregorianCalendar.Class#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.gregoriancalendar.class/cs/minimum1.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.gregoriancalendar.class/vb/minimum1.vb#1)]
Each <xref:System.Globalization.CultureInfo> supports a set of calendars. The <xref:System.Globalization.CultureInfo.Calendar%2A> property returns the default calendar for the culture, and the <xref:System.Globalization.CultureInfo.OptionalCalendars%2A> property returns an array containing all the calendars supported by the culture. To change the calendar used by a <xref:System.Globalization.CultureInfo>, the application can set the <xref:System.Globalization.DateTimeFormatInfo.Calendar%2A> property to a new <xref:System.Globalization.Calendar>.
<xref:System.Globalization.DateTimeFormatInfo.GetEra%2A> ignores punctuation in abbreviated era names, only if the <xref:System.Globalization.GregorianCalendar> is selected in <xref:System.Globalization.DateTimeFormatInfo.Calendar%2A?displayProperty=nameWithType> and the culture uses "A.D." as the era name, that is, "A.D." is equivalent to "AD".
## Examples
The following code example shows that <xref:System.Globalization.DateTimeFormatInfo> ignores the punctuation in the era name, only if the calendar is Gregorian and the culture uses the era name "A.D.".
[!code-cpp[System.Globalization.GregorianCalendar.GetEra#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetEra/CPP/gregorian_getera.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.GetEra#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetEra/CS/gregorian_getera.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.GetEra#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetEra/VB/gregorian_getera.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Globalization.Calendar" />
<altmember cref="P:System.Globalization.CultureInfo.Calendar" />
<altmember cref="P:System.Globalization.CultureInfo.OptionalCalendars" />
<related type="Article" href="~/docs/standard/datetime/working-with-calendars.md">Working with Calendars</related>
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/NET-Framework-4-Calendar-3360a84a">Sample: Calendar Week Range Utility</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Globalization.GregorianCalendar" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public GregorianCalendar ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; GregorianCalendar();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Globalization.GregorianCalendar" /> class using the default <see cref="T:System.Globalization.GregorianCalendarTypes" /> value.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default <xref:System.Globalization.GregorianCalendarTypes> value is <xref:System.Globalization.GregorianCalendarTypes.Localized>. If the <xref:System.Globalization.DateTimeFormatInfo.Calendar%2A?displayProperty=nameWithType> property of the <xref:System.Globalization.CultureInfo> is set to a <xref:System.Globalization.GregorianCalendar> that is created with this constructor, the dates and times are localized in the language associated with the <xref:System.Globalization.CultureInfo>.
## Examples
The following code example prints a <xref:System.DateTime> using a <xref:System.Globalization.GregorianCalendar> that is localized.
[!code-cpp[System.Globalization.GregorianCalendarLocalized#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendarLocalized/CPP/gregorianlocalized.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendarLocalized#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendarLocalized/CS/gregorianlocalized.cs#1)]
[!code-vb[System.Globalization.GregorianCalendarLocalized#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendarLocalized/VB/gregorianlocalized.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Globalization.GregorianCalendarTypes" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public GregorianCalendar (System.Globalization.GregorianCalendarTypes type);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Globalization.GregorianCalendarTypes type) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.#ctor(System.Globalization.GregorianCalendarTypes)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (type As GregorianCalendarTypes)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; GregorianCalendar(System::Globalization::GregorianCalendarTypes type);" />
<MemberSignature Language="F#" Value="new System.Globalization.GregorianCalendar : System.Globalization.GregorianCalendarTypes -&gt; System.Globalization.GregorianCalendar" Usage="new System.Globalization.GregorianCalendar type" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="type" Type="System.Globalization.GregorianCalendarTypes" />
</Parameters>
<Docs>
<param name="type">The <see cref="T:System.Globalization.GregorianCalendarTypes" /> value that denotes which language version of the calendar to create.</param>
<summary>Initializes a new instance of the <see cref="T:System.Globalization.GregorianCalendar" /> class using the specified <see cref="T:System.Globalization.GregorianCalendarTypes" /> value.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="type" /> is not a member of the <see cref="T:System.Globalization.GregorianCalendarTypes" /> enumeration.</exception>
<altmember cref="T:System.Globalization.GregorianCalendarTypes" />
</Docs>
</Member>
<Member MemberName="AddMonths">
<MemberSignature Language="C#" Value="public override DateTime AddMonths (DateTime time, int months);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance valuetype System.DateTime AddMonths(valuetype System.DateTime time, int32 months) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.AddMonths(System.DateTime,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function AddMonths (time As DateTime, months As Integer) As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override DateTime AddMonths(DateTime time, int months);" />
<MemberSignature Language="F#" Value="override this.AddMonths : DateTime * int -&gt; DateTime" Usage="gregorianCalendar.AddMonths (time, months)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
<Parameter Name="months" Type="System.Int32" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to which to add months.</param>
<param name="months">The number of months to add.</param>
<summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of months away from the specified <see cref="T:System.DateTime" />.</summary>
<returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of months to the specified <see cref="T:System.DateTime" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The day part of the resulting <xref:System.DateTime> is affected if the resulting day is not a valid day in the resulting month of the resulting year. It is changed to the last valid day in the resulting month of the resulting year. The year part of the resulting <xref:System.DateTime> is affected if the resulting month is outside the year of the specified <xref:System.DateTime>. This implementation supports only the current era. Therefore, <xref:System.ArgumentException> is thrown if the resulting year is outside the era of the specified <xref:System.DateTime>. The time-of-day part of the resulting <xref:System.DateTime> remains the same as the specified <xref:System.DateTime>.
For example, if the specified month is October, which has 31 days, the specified day is the 31st day of that month, and the value of the `months` parameter is 6, the resulting year is one more than the specified year, the resulting month is April, and the resulting day is the 30th day, which is the last day in April.
If the value of the `months` parameter is negative, the resulting <xref:System.DateTime> is earlier than the specified <xref:System.DateTime>.
The <xref:System.DateTime.Kind%2A> property of the returned <xref:System.DateTime> value always equals <xref:System.DateTimeKind.Unspecified?displayProperty=nameWithType>. You can preserve the <xref:System.DateTime.Kind%2A> property of the `time` parameter by calling the <xref:System.DateTime.SpecifyKind%2A?displayProperty=nameWithType> method, as the following example shows.
[!code-csharp[System.Globalization.Calendar.AddMethods#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.calendar.addmethods/cs/add1.cs#5)]
[!code-vb[System.Globalization.Calendar.AddMethods#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.calendar.addmethods/vb/add1.vb#5)]
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="months" /> is less than -120000.
-or-
<paramref name="months" /> is greater than 120000.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="M:System.Globalization.GregorianCalendar.AddYears(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddDays(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddHours(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddMinutes(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddSeconds(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddMilliseconds(System.DateTime,System.Double)" />
</Docs>
</Member>
<Member MemberName="AddWeeks">
<MemberSignature Language="C#" Value="public override DateTime AddWeeks (DateTime time, int weeks);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance valuetype System.DateTime AddWeeks(valuetype System.DateTime time, int32 weeks) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.AddWeeks(System.DateTime,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function AddWeeks (time As DateTime, weeks As Integer) As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override DateTime AddWeeks(DateTime time, int weeks);" />
<MemberSignature Language="F#" Value="override this.AddWeeks : DateTime * int -&gt; DateTime" Usage="gregorianCalendar.AddWeeks (time, weeks)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" Index="0" FrameworkAlternate="netframework-1.1" />
<Parameter Name="weeks" Type="System.Int32" Index="1" FrameworkAlternate="netframework-1.1" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to which to add weeks.</param>
<param name="weeks">The number of weeks to add.</param>
<summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of weeks away from the specified <c>DateTime</c>.</summary>
<returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of weeks to the specified <c>DateTime</c>.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddYears">
<MemberSignature Language="C#" Value="public override DateTime AddYears (DateTime time, int years);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance valuetype System.DateTime AddYears(valuetype System.DateTime time, int32 years) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.AddYears(System.DateTime,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function AddYears (time As DateTime, years As Integer) As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override DateTime AddYears(DateTime time, int years);" />
<MemberSignature Language="F#" Value="override this.AddYears : DateTime * int -&gt; DateTime" Usage="gregorianCalendar.AddYears (time, years)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
<Parameter Name="years" Type="System.Int32" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to which to add years.</param>
<param name="years">The number of years to add.</param>
<summary>Returns a <see cref="T:System.DateTime" /> that is the specified number of years away from the specified <see cref="T:System.DateTime" />.</summary>
<returns>The <see cref="T:System.DateTime" /> that results from adding the specified number of years to the specified <see cref="T:System.DateTime" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The day part of the resulting <xref:System.DateTime> is affected if the resulting day is not a valid day in the resulting month of the resulting year. It is changed to the last valid day in the resulting month of the resulting year. The month part of the resulting <xref:System.DateTime> remains the same as the specified <xref:System.DateTime>. This implementation supports only the current era. Therefore, <xref:System.ArgumentException> is thrown if the resulting year is outside the era of the specified <xref:System.DateTime>. The time-of-day part of the resulting <xref:System.DateTime> remains the same as the specified <xref:System.DateTime>.
For example, February has 28 days, except during leap years when it has 29 days. If the specified date is the 29th day of February in a leap year and the value of `years` is 1, the resulting date will be the 28th day of February in the following year.
If `years` is negative, the resulting <xref:System.DateTime> is earlier than the specified <xref:System.DateTime>.
The <xref:System.DateTime.Kind%2A> property of the returned <xref:System.DateTime> value always equals <xref:System.DateTimeKind.Unspecified?displayProperty=nameWithType>. You can preserve the <xref:System.DateTime.Kind%2A> property of the `time` parameter by calling the <xref:System.DateTime.SpecifyKind%2A?displayProperty=nameWithType> method, as the following example shows.
[!code-csharp[System.Globalization.Calendar.AddMethods#8](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.calendar.addmethods/cs/add1.cs#8)]
[!code-vb[System.Globalization.Calendar.AddMethods#8](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.calendar.addmethods/vb/add1.vb#8)]
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The resulting <see cref="T:System.DateTime" /> is outside the supported range.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="M:System.Globalization.GregorianCalendar.AddMonths(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddDays(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddHours(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddMinutes(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddSeconds(System.DateTime,System.Int32)" />
<altmember cref="M:System.Globalization.Calendar.AddMilliseconds(System.DateTime,System.Double)" />
</Docs>
</Member>
<Member MemberName="ADEra">
<MemberSignature Language="C#" Value="public const int ADEra = 1;" />
<MemberSignature Language="ILAsm" Value=".field public static literal int32 ADEra = (1)" />
<MemberSignature Language="DocId" Value="F:System.Globalization.GregorianCalendar.ADEra" />
<MemberSignature Language="VB.NET" Value="Public Const ADEra As Integer = 1" />
<MemberSignature Language="C++ CLI" Value="public: int ADEra = 1;" />
<MemberSignature Language="F#" Value="val mutable ADEra : int" Usage="System.Globalization.GregorianCalendar.ADEra" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>Represents the current era. This field is constant.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Gregorian calendar recognizes two eras: B.C. or B.C.E., and A.D. or C.E. This implementation of the <xref:System.Globalization.GregorianCalendar> class recognizes only the current era (A.D. or C.E.). This field always returns 1.
]]></format>
</remarks>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
</Docs>
</Member>
<Member MemberName="AlgorithmType">
<MemberSignature Language="C#" Value="public override System.Globalization.CalendarAlgorithmType AlgorithmType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Globalization.CalendarAlgorithmType AlgorithmType" />
<MemberSignature Language="DocId" Value="P:System.Globalization.GregorianCalendar.AlgorithmType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property AlgorithmType As CalendarAlgorithmType" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Globalization::CalendarAlgorithmType AlgorithmType { System::Globalization::CalendarAlgorithmType get(); };" />
<MemberSignature Language="F#" Value="member this.AlgorithmType : System.Globalization.CalendarAlgorithmType" Usage="System.Globalization.GregorianCalendar.AlgorithmType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Globalization.CalendarAlgorithmType</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.</summary>
<value>Always returns <see cref="F:System.Globalization.CalendarAlgorithmType.SolarCalendar" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses reflection to instantiate each <xref:System.Globalization.Calendar> type found in the .NET Framework and displays the value of its <xref:System.Globalization.Calendar.AlgorithmType%2A> property.
[!code-csharp[System.Globalization.Calendar.AlgorithmType#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.calendar.algorithmtype/cs/algorithmtype1.cs#1)]
[!code-vb[System.Globalization.Calendar.AlgorithmType#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.calendar.algorithmtype/vb/algorithmtype1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CalendarType">
<MemberSignature Language="C#" Value="public virtual System.Globalization.GregorianCalendarTypes CalendarType { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Globalization.GregorianCalendarTypes CalendarType" />
<MemberSignature Language="DocId" Value="P:System.Globalization.GregorianCalendar.CalendarType" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property CalendarType As GregorianCalendarTypes" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Globalization::GregorianCalendarTypes CalendarType { System::Globalization::GregorianCalendarTypes get(); void set(System::Globalization::GregorianCalendarTypes value); };" />
<MemberSignature Language="F#" Value="member this.CalendarType : System.Globalization.GregorianCalendarTypes with get, set" Usage="System.Globalization.GregorianCalendar.CalendarType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Globalization.GregorianCalendarTypes</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="T:System.Globalization.GregorianCalendarTypes" /> value that denotes the language version of the current <see cref="T:System.Globalization.GregorianCalendar" />.</summary>
<value>A <see cref="T:System.Globalization.GregorianCalendarTypes" /> value that denotes the language version of the current <see cref="T:System.Globalization.GregorianCalendar" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to determine the GregorianCalendar language version supported by the culture.
[!code-cpp[System.Globalization.GregorianCalendarTypes#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendarTypes/CPP/gregoriancalendartypes.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendarTypes#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendarTypes/CS/gregoriancalendartypes.cs#1)]
[!code-vb[System.Globalization.GregorianCalendarTypes#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendarTypes/VB/gregoriancalendartypes.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The value specified in a set operation is not a member of the <see cref="T:System.Globalization.GregorianCalendarTypes" /> enumeration.</exception>
<exception cref="T:System.InvalidOperationException">In a set operation, the current instance is read-only.</exception>
<altmember cref="T:System.Globalization.GregorianCalendarTypes" />
</Docs>
</Member>
<Member MemberName="Eras">
<MemberSignature Language="C#" Value="public override int[] Eras { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32[] Eras" />
<MemberSignature Language="DocId" Value="P:System.Globalization.GregorianCalendar.Eras" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Eras As Integer()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property cli::array &lt;int&gt; ^ Eras { cli::array &lt;int&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Eras : int[]" Usage="System.Globalization.GregorianCalendar.Eras" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the list of eras in the <see cref="T:System.Globalization.GregorianCalendar" />.</summary>
<value>An array of integers that represents the eras in the <see cref="T:System.Globalization.GregorianCalendar" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Gregorian calendar recognizes two eras: B.C. or B.C.E., and A.D. or C.E. This implementation of the <xref:System.Globalization.GregorianCalendar> class recognizes only the current era (A.D. or C.E.). This property always returns an array with only one element.
]]></format>
</remarks>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
</Docs>
</Member>
<Member MemberName="GetDayOfMonth">
<MemberSignature Language="C#" Value="public override int GetDayOfMonth (DateTime time);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetDayOfMonth(valuetype System.DateTime time) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetDayOfMonth(System.DateTime)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetDayOfMonth (time As DateTime) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetDayOfMonth(DateTime time);" />
<MemberSignature Language="F#" Value="override this.GetDayOfMonth : DateTime -&gt; int" Usage="gregorianCalendar.GetDayOfMonth time" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
<summary>Returns the day of the month in the specified <see cref="T:System.DateTime" />.</summary>
<returns>An integer from 1 to 31 that represents the day of the month in <paramref name="time" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.DateTime.Day" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetEra(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfWeek(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
</Docs>
</Member>
<Member MemberName="GetDayOfWeek">
<MemberSignature Language="C#" Value="public override DayOfWeek GetDayOfWeek (DateTime time);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance valuetype System.DayOfWeek GetDayOfWeek(valuetype System.DateTime time) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetDayOfWeek(System.DateTime)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetDayOfWeek (time As DateTime) As DayOfWeek" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override DayOfWeek GetDayOfWeek(DateTime time);" />
<MemberSignature Language="F#" Value="override this.GetDayOfWeek : DateTime -&gt; DayOfWeek" Usage="gregorianCalendar.GetDayOfWeek time" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DayOfWeek</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
<summary>Returns the day of the week in the specified <see cref="T:System.DateTime" />.</summary>
<returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in <paramref name="time" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.DayOfWeek> values are Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.DateTime.DayOfWeek" />
<altmember cref="T:System.DayOfWeek" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetEra(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
</Docs>
</Member>
<Member MemberName="GetDayOfYear">
<MemberSignature Language="C#" Value="public override int GetDayOfYear (DateTime time);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetDayOfYear(valuetype System.DateTime time) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetDayOfYear(System.DateTime)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetDayOfYear (time As DateTime) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetDayOfYear(DateTime time);" />
<MemberSignature Language="F#" Value="override this.GetDayOfYear : DateTime -&gt; int" Usage="gregorianCalendar.GetDayOfYear time" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
<summary>Returns the day of the year in the specified <see cref="T:System.DateTime" />.</summary>
<returns>An integer from 1 to 366 that represents the day of the year in <paramref name="time" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The day of the year is defined as the number of days from the first day of the year. For example, <xref:System.Globalization.GregorianCalendar.GetDayOfYear%2A> for the first day of the first month returns 1, and <xref:System.Globalization.GregorianCalendar.GetDayOfYear%2A> for the last day of the last month returns the total number of days in that year, which is the same value returned by <xref:System.Globalization.GregorianCalendar.GetDaysInYear%2A>.
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.DateTime.DayOfYear" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetEra(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfWeek(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
</Docs>
</Member>
<Member MemberName="GetDaysInMonth">
<MemberSignature Language="C#" Value="public override int GetDaysInMonth (int year, int month, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetDaysInMonth(int32 year, int32 month, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetDaysInMonth(System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetDaysInMonth (year As Integer, month As Integer, era As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetDaysInMonth(int year, int month, int era);" />
<MemberSignature Language="F#" Value="override this.GetDaysInMonth : int * int * int -&gt; int" Usage="gregorianCalendar.GetDaysInMonth (year, month, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="month" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="month">An integer from 1 to 12 that represents the month.</param>
<param name="era">An integer that represents the era.</param>
<summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
<returns>The number of days in the specified month in the specified year in the specified era.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For example, this method returns 28 or 29 for February (`month` = 2), depending on whether `year` is a leap year.
## Examples
The following code example calls GetDaysInMonth for the second month in each of five years in each era.
[!code-cpp[System.Globalization.GregorianCalendar.GetDaysInMonth#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetDaysInMonth/CPP/gregoriancalendar_getdaysinmonth.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.GetDaysInMonth#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetDaysInMonth/CS/gregoriancalendar_getdaysinmonth.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.GetDaysInMonth#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetDaysInMonth/VB/gregoriancalendar_getdaysinmonth.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.
-or-
<paramref name="month" /> is outside the range supported by the calendar.</exception>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDaysInYear(System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="GetDaysInYear">
<MemberSignature Language="C#" Value="public override int GetDaysInYear (int year, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetDaysInYear(int32 year, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetDaysInYear(System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetDaysInYear (year As Integer, era As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetDaysInYear(int year, int era);" />
<MemberSignature Language="F#" Value="override this.GetDaysInYear : int * int -&gt; int" Usage="gregorianCalendar.GetDaysInYear (year, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="era">An integer that represents the era.</param>
<summary>Returns the number of days in the specified year in the specified era.</summary>
<returns>The number of days in the specified year in the specified era.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For example, this method returns 365 or 366, depending on whether `year` is a leap year.
## Examples
The following code example calls GetDaysInYear for five years in each era.
[!code-cpp[System.Globalization.GregorianCalendar.GetDaysInYear#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetDaysInYear/CPP/gregoriancalendar_getdaysinyear.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.GetDaysInYear#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetDaysInYear/CS/gregoriancalendar_getdaysinyear.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.GetDaysInYear#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetDaysInYear/VB/gregoriancalendar_getdaysinyear.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.</exception>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDaysInMonth(System.Int32,System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="GetEra">
<MemberSignature Language="C#" Value="public override int GetEra (DateTime time);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetEra(valuetype System.DateTime time) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetEra(System.DateTime)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetEra (time As DateTime) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetEra(DateTime time);" />
<MemberSignature Language="F#" Value="override this.GetEra : DateTime -&gt; int" Usage="gregorianCalendar.GetEra time" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
<summary>Returns the era in the specified <see cref="T:System.DateTime" />.</summary>
<returns>An integer that represents the era in <paramref name="time" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Gregorian calendar recognizes two eras: B.C. or B.C.E., and A.D. or C.E. This implementation of the <xref:System.Globalization.GregorianCalendar> class recognizes only the current era (A.D. or C.E.).
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.DateTime" />
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfWeek(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
<altmember cref="M:System.Globalization.Calendar.GetHour(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetMinute(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetSecond(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetMilliseconds(System.DateTime)" />
</Docs>
</Member>
<Member MemberName="GetLeapMonth">
<MemberSignature Language="C#" Value="public override int GetLeapMonth (int year, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetLeapMonth(int32 year, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetLeapMonth(System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetLeapMonth (year As Integer, era As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetLeapMonth(int year, int era);" />
<MemberSignature Language="F#" Value="override this.GetLeapMonth : int * int -&gt; int" Usage="gregorianCalendar.GetLeapMonth (year, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" Index="0" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="era" Type="System.Int32" Index="1" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="year">A year.</param>
<param name="era">An era. Specify either <see cref="F:System.Globalization.GregorianCalendar.ADEra" /> or <see langword="GregorianCalendar.Eras[Calendar.CurrentEra]" />.</param>
<summary>Calculates the leap month for a specified year and era.</summary>
<returns>Always 0 because the Gregorian calendar does not recognize leap months.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> is less than the Gregorian calendar year 1 or greater than the Gregorian calendar year 9999.
-or-
<paramref name="era" /> is not <see cref="F:System.Globalization.GregorianCalendar.ADEra" /> or <see langword="GregorianCalendar.Eras[Calendar.CurrentEra]" />.</exception>
</Docs>
</Member>
<Member MemberName="GetMonth">
<MemberSignature Language="C#" Value="public override int GetMonth (DateTime time);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetMonth(valuetype System.DateTime time) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetMonth(System.DateTime)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetMonth (time As DateTime) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetMonth(DateTime time);" />
<MemberSignature Language="F#" Value="override this.GetMonth : DateTime -&gt; int" Usage="gregorianCalendar.GetMonth time" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
<summary>Returns the month in the specified <see cref="T:System.DateTime" />.</summary>
<returns>An integer from 1 to 12 that represents the month in <paramref name="time" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.DateTime.Month" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetEra(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfWeek(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
<altmember cref="M:System.Globalization.Calendar.GetHour(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetMinute(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetSecond(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetMilliseconds(System.DateTime)" />
</Docs>
</Member>
<Member MemberName="GetMonthsInYear">
<MemberSignature Language="C#" Value="public override int GetMonthsInYear (int year, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetMonthsInYear(int32 year, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetMonthsInYear (year As Integer, era As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetMonthsInYear(int year, int era);" />
<MemberSignature Language="F#" Value="override this.GetMonthsInYear : int * int -&gt; int" Usage="gregorianCalendar.GetMonthsInYear (year, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="era">An integer that represents the era.</param>
<summary>Returns the number of months in the specified year in the specified era.</summary>
<returns>The number of months in the specified year in the specified era.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example calls GetMonthsInYear for five years in each era.
[!code-cpp[System.Globalization.GregorianCalendar.GetMonthsInYear#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetMonthsInYear/CPP/gregoriancalendar_getmonthsinyear.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.GetMonthsInYear#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetMonthsInYear/CS/gregoriancalendar_getmonthsinyear.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.GetMonthsInYear#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.GetMonthsInYear/VB/gregoriancalendar_getmonthsinyear.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.</exception>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDaysInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDaysInMonth(System.Int32,System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="GetWeekOfYear">
<MemberSignature Language="C#" Value="public override int GetWeekOfYear (DateTime time, System.Globalization.CalendarWeekRule rule, DayOfWeek firstDayOfWeek);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetWeekOfYear(valuetype System.DateTime time, valuetype System.Globalization.CalendarWeekRule rule, valuetype System.DayOfWeek firstDayOfWeek) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetWeekOfYear (time As DateTime, rule As CalendarWeekRule, firstDayOfWeek As DayOfWeek) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetWeekOfYear(DateTime time, System::Globalization::CalendarWeekRule rule, DayOfWeek firstDayOfWeek);" />
<MemberSignature Language="F#" Value="override this.GetWeekOfYear : DateTime * System.Globalization.CalendarWeekRule * DayOfWeek -&gt; int" Usage="gregorianCalendar.GetWeekOfYear (time, rule, firstDayOfWeek)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0">
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<Parameter Name="rule" Type="System.Globalization.CalendarWeekRule" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
<Parameter Name="firstDayOfWeek" Type="System.DayOfWeek" Index="2" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> object to read. </param>
<param name="rule">One of the <see cref="T:System.Globalization.CalendarWeekRule" /> values that defines a calendar week. </param>
<param name="firstDayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values that represents the first day of the week. </param>
<summary>Returns the week of the year that includes the date in the specified <see cref="T:System.DateTime" /> object.</summary>
<returns>A 1-based integer that represents the week of the year that includes the date in the <paramref name="time" /> parameter.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="firstDayOfWeek" /> is outside the range supported by the calendar.
-or-
<paramref name="rule" /> is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
</Docs>
</Member>
<Member MemberName="GetYear">
<MemberSignature Language="C#" Value="public override int GetYear (DateTime time);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetYear(valuetype System.DateTime time) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.GetYear(System.DateTime)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetYear (time As DateTime) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetYear(DateTime time);" />
<MemberSignature Language="F#" Value="override this.GetYear : DateTime -&gt; int" Usage="gregorianCalendar.GetYear time" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="time" Type="System.DateTime" />
</Parameters>
<Docs>
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
<summary>Returns the year in the specified <see cref="T:System.DateTime" />.</summary>
<returns>An integer that represents the year in <paramref name="time" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example displays the values of several components of a <xref:System.DateTime> in terms of the Gregorian calendar.
[!code-cpp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CPP/gregoriancalendar_addget.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/CS/gregoriancalendar_addget.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_AddGet#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_AddGet/VB/gregoriancalendar_addget.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.DateTime.Year" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetEra(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDayOfWeek(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)" />
<altmember cref="M:System.Globalization.Calendar.GetHour(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetMinute(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetSecond(System.DateTime)" />
<altmember cref="M:System.Globalization.Calendar.GetMilliseconds(System.DateTime)" />
</Docs>
</Member>
<Member MemberName="IsLeapDay">
<MemberSignature Language="C#" Value="public override bool IsLeapDay (int year, int month, int day, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsLeapDay(int32 year, int32 month, int32 day, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.IsLeapDay(System.Int32,System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsLeapDay (year As Integer, month As Integer, day As Integer, era As Integer) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool IsLeapDay(int year, int month, int day, int era);" />
<MemberSignature Language="F#" Value="override this.IsLeapDay : int * int * int * int -&gt; bool" Usage="gregorianCalendar.IsLeapDay (year, month, day, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="month" Type="System.Int32" />
<Parameter Name="day" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="month">An integer from 1 to 12 that represents the month.</param>
<param name="day">An integer from 1 to 31 that represents the day.</param>
<param name="era">An integer that represents the era.</param>
<summary>Determines whether the specified date in the specified era is a leap day.</summary>
<returns>
<see langword="true" /> if the specified day is a leap day; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A leap year in the Gregorian calendar is defined as a year that is evenly divisible by four, except if it is divisible by 100. However, years that are divisible by 400 are leap years. For example, the year 1900 was not a leap year, but the year 2000 was. A common year has 365 days and a leap year has 366 days.
A leap day is a day that occurs only in a leap year. In the Gregorian calendar, the 29th day of February is the only leap day.
## Examples
The following code example calls IsLeapDay for the last day of the second month (February) for five years in each of the eras.
[!code-cpp[System.Globalization.GregorianCalendar.IsLeapDay#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapDay/CPP/gregoriancalendar_isleapday.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.IsLeapDay#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapDay/CS/gregoriancalendar_isleapday.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.IsLeapDay#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapDay/VB/gregoriancalendar_isleapday.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.
-or-
<paramref name="month" /> is outside the range supported by the calendar.
-or-
<paramref name="day" /> is outside the range supported by the calendar.</exception>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDaysInMonth(System.Int32,System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.IsLeapYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.IsLeapMonth(System.Int32,System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="IsLeapMonth">
<MemberSignature Language="C#" Value="public override bool IsLeapMonth (int year, int month, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsLeapMonth(int32 year, int32 month, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.IsLeapMonth(System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsLeapMonth (year As Integer, month As Integer, era As Integer) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool IsLeapMonth(int year, int month, int era);" />
<MemberSignature Language="F#" Value="override this.IsLeapMonth : int * int * int -&gt; bool" Usage="gregorianCalendar.IsLeapMonth (year, month, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="month" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="month">An integer from 1 to 12 that represents the month.</param>
<param name="era">An integer that represents the era.</param>
<summary>Determines whether the specified month in the specified year in the specified era is a leap month.</summary>
<returns>This method always returns <see langword="false" />, unless overridden by a derived class.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A leap year in the Gregorian calendar is defined as a year that is evenly divisible by four, except if it is divisible by 100. However, years that are divisible by 400 are leap years. For example, the year 1900 was not a leap year, but the year 2000 was. A common year has 365 days and a leap year has 366 days.
A leap month is an entire month that occurs only in a leap year. The Gregorian calendar does not have any leap months.
## Examples
The following code example calls IsLeapMonth for all the months in five years in the current era.
[!code-cpp[System.Globalization.GregorianCalendar.IsLeapMonth#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapMonth/CPP/gregoriancalendar_isleapmonth.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.IsLeapMonth#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapMonth/CS/gregoriancalendar_isleapmonth.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.IsLeapMonth#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapMonth/VB/gregoriancalendar_isleapmonth.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.
-or-
<paramref name="month" /> is outside the range supported by the calendar.</exception>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.IsLeapYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.IsLeapDay(System.Int32,System.Int32,System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="IsLeapYear">
<MemberSignature Language="C#" Value="public override bool IsLeapYear (int year, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsLeapYear(int32 year, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.IsLeapYear(System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsLeapYear (year As Integer, era As Integer) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool IsLeapYear(int year, int era);" />
<MemberSignature Language="F#" Value="override this.IsLeapYear : int * int -&gt; bool" Usage="gregorianCalendar.IsLeapYear (year, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="era">An integer that represents the era.</param>
<summary>Determines whether the specified year in the specified era is a leap year.</summary>
<returns>
<see langword="true" /> if the specified year is a leap year; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A leap year in the Gregorian calendar is defined as a year that is evenly divisible by four, except if it is divisible by 100. However, years that are divisible by 400 are leap years. For example, the year 1900 was not a leap year, but the year 2000 was. A common year has 365 days and a leap year has 366 days.
## Examples
The following code example calls IsLeapYear for five years in each of the eras.
[!code-cpp[System.Globalization.GregorianCalendar.IsLeapYear#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapYear/CPP/gregoriancalendar_isleapyear.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar.IsLeapYear#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapYear/CS/gregoriancalendar_isleapyear.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar.IsLeapYear#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar.IsLeapYear/VB/gregoriancalendar_isleapyear.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.</exception>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.IsLeapMonth(System.Int32,System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.IsLeapDay(System.Int32,System.Int32,System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="MaxSupportedDateTime">
<MemberSignature Language="C#" Value="public override DateTime MaxSupportedDateTime { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime MaxSupportedDateTime" />
<MemberSignature Language="DocId" Value="P:System.Globalization.GregorianCalendar.MaxSupportedDateTime" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property MaxSupportedDateTime As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property DateTime MaxSupportedDateTime { DateTime get(); };" />
<MemberSignature Language="F#" Value="member this.MaxSupportedDateTime : DateTime" Usage="System.Globalization.GregorianCalendar.MaxSupportedDateTime" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type.</summary>
<value>The latest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type, which is the last moment of December 31, 9999 C.E. and is equivalent to <see cref="F:System.DateTime.MaxValue" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example gets the minimum value and the maximum value of the calendar.
[!code-cpp[System.Globalization.GregorianCalendar_MinMax#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_MinMax/CPP/gregoriancalendar_minmax.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_MinMax#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_MinMax/CS/gregoriancalendar_minmax.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_MinMax#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_MinMax/VB/gregoriancalendar_minmax.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MinSupportedDateTime">
<MemberSignature Language="C#" Value="public override DateTime MinSupportedDateTime { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime MinSupportedDateTime" />
<MemberSignature Language="DocId" Value="P:System.Globalization.GregorianCalendar.MinSupportedDateTime" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property MinSupportedDateTime As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property DateTime MinSupportedDateTime { DateTime get(); };" />
<MemberSignature Language="F#" Value="member this.MinSupportedDateTime : DateTime" Usage="System.Globalization.GregorianCalendar.MinSupportedDateTime" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type.</summary>
<value>The earliest date and time supported by the <see cref="T:System.Globalization.GregorianCalendar" /> type, which is the first moment of January 1, 0001 C.E. and is equivalent to <see cref="F:System.DateTime.MinValue" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Although the value of the <xref:System.Globalization.GregorianCalendar.MinSupportedDateTime%2A> property is the first moment of January 1, 0001 C.E., the Gregorian calendar was not introduced until October 15, 1582, and its adoption throughout the European continent and worldwide was slow. Until they adopted the Gregorian calendar, most cultures in the European, American, and Australian continents used the Julian calendar, which is represented by the <xref:System.Globalization.JulianCalendar> class.
## Examples
The following code example gets the minimum value and the maximum value of the calendar.
[!code-cpp[System.Globalization.GregorianCalendar_MinMax#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_MinMax/CPP/gregoriancalendar_minmax.cpp#1)]
[!code-csharp[System.Globalization.GregorianCalendar_MinMax#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_MinMax/CS/gregoriancalendar_minmax.cs#1)]
[!code-vb[System.Globalization.GregorianCalendar_MinMax#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.GregorianCalendar_MinMax/VB/gregoriancalendar_minmax.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ToDateTime">
<MemberSignature Language="C#" Value="public override DateTime ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, int era);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance valuetype System.DateTime ToDateTime(int32 year, int32 month, int32 day, int32 hour, int32 minute, int32 second, int32 millisecond, int32 era) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.ToDateTime(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToDateTime (year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, millisecond As Integer, era As Integer) As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era);" />
<MemberSignature Language="F#" Value="override this.ToDateTime : int * int * int * int * int * int * int * int -&gt; DateTime" Usage="gregorianCalendar.ToDateTime (year, month, day, hour, minute, second, millisecond, era)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
<Parameter Name="month" Type="System.Int32" />
<Parameter Name="day" Type="System.Int32" />
<Parameter Name="hour" Type="System.Int32" />
<Parameter Name="minute" Type="System.Int32" />
<Parameter Name="second" Type="System.Int32" />
<Parameter Name="millisecond" Type="System.Int32" />
<Parameter Name="era" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer that represents the year.</param>
<param name="month">An integer from 1 to 12 that represents the month.</param>
<param name="day">An integer from 1 to 31 that represents the day.</param>
<param name="hour">An integer from 0 to 23 that represents the hour.</param>
<param name="minute">An integer from 0 to 59 that represents the minute.</param>
<param name="second">An integer from 0 to 59 that represents the second.</param>
<param name="millisecond">An integer from 0 to 999 that represents the millisecond.</param>
<param name="era">An integer that represents the era.</param>
<summary>Returns a <see cref="T:System.DateTime" /> that is set to the specified date and time in the specified era.</summary>
<returns>The <see cref="T:System.DateTime" /> that is set to the specified date and time in the current era.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="era" /> is outside the range supported by the calendar.
-or-
<paramref name="year" /> is outside the range supported by the calendar.
-or-
<paramref name="month" /> is outside the range supported by the calendar.
-or-
<paramref name="day" /> is outside the range supported by the calendar.
-or-
<paramref name="hour" /> is less than zero or greater than 23.
-or-
<paramref name="minute" /> is less than zero or greater than 59.
-or-
<paramref name="second" /> is less than zero or greater than 59.
-or-
<paramref name="millisecond" /> is less than zero or greater than 999.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.GregorianCalendar.ADEra" />
<altmember cref="P:System.Globalization.GregorianCalendar.Eras" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.GregorianCalendar.GetDaysInMonth(System.Int32,System.Int32,System.Int32)" />
</Docs>
</Member>
<Member MemberName="ToFourDigitYear">
<MemberSignature Language="C#" Value="public override int ToFourDigitYear (int year);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 ToFourDigitYear(int32 year) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.GregorianCalendar.ToFourDigitYear(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToFourDigitYear (year As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int ToFourDigitYear(int year);" />
<MemberSignature Language="F#" Value="override this.ToFourDigitYear : int -&gt; int" Usage="gregorianCalendar.ToFourDigitYear year" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">A two-digit or four-digit integer that represents the year to convert.</param>
<summary>Converts the specified year to a four-digit year by using the <see cref="P:System.Globalization.GregorianCalendar.TwoDigitYearMax" /> property to determine the appropriate century.</summary>
<returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Globalization.GregorianCalendar.TwoDigitYearMax%2A> is the last year in the 100-year range that can be represented by a two-digit year. The century is determined by finding the sole occurrence of the two-digit `year` within that 100-year range. For example, if <xref:System.Globalization.GregorianCalendar.TwoDigitYearMax%2A> is set to 2029, the 100-year range is from 1930 to 2029. Therefore, a 2-digit value of 30 is interpreted as 1930, while a 2-digit value of 29 is interpreted as 2029.
<xref:System.Globalization.GregorianCalendar.ToFourDigitYear%2A> supports either a two-digit year or a four-digit year. Passing a two-digit year value (less than 100) causes the method to convert the value to a four-digit value according to the <xref:System.Globalization.GregorianCalendar.TwoDigitYearMax%2A> value representing the appropriate century. If the application supplies a four-digit year value that is within the supported calendar range to <xref:System.Globalization.GregorianCalendar.ToFourDigitYear%2A>, the method returns the actual input value. If the application supplies a four-digit value that is outside the supported calendar range, or if it supplies a negative value, the method throws an exception.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> is outside the range supported by the calendar.</exception>
<altmember cref="P:System.Globalization.GregorianCalendar.TwoDigitYearMax" />
</Docs>
</Member>
<Member MemberName="TwoDigitYearMax">
<MemberSignature Language="C#" Value="public override int TwoDigitYearMax { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 TwoDigitYearMax" />
<MemberSignature Language="DocId" Value="P:System.Globalization.GregorianCalendar.TwoDigitYearMax" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property TwoDigitYearMax As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property int TwoDigitYearMax { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.TwoDigitYearMax : int with get, set" Usage="System.Globalization.GregorianCalendar.TwoDigitYearMax" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.</summary>
<value>The last year of a 100-year range that can be represented by a 2-digit year.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property allows a 2-digit year to be properly translated to a 4-digit year. For example, if this property is set to 2029, the 100-year range is from 1930 to 2029. Therefore, a 2-digit value of 30 is interpreted as 1930, while a 2-digit value of 29 is interpreted as 2029.
The initial value of this property is derived from the settings in the regional and language options portion of Control Panel. However, that information can change during the life of the <xref:System.AppDomain>. The <xref:System.Globalization.GregorianCalendar> class does not detect changes in the system settings automatically.
The application should set this value to 99 to indicate that 2-digit years are to be taken literally. For example, if this property is set to 99, the 100-year range is from 0 (not a valid value for most calendars) to 99. Therefore, a 2-digit value of 30 is interpreted as 30.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The value specified in a set operation is less than 99.
-or-
The value specified in a set operation is greater than <see langword="MaxSupportedDateTime.Year" />.</exception>
<exception cref="T:System.InvalidOperationException">In a set operation, the current instance is read-only.</exception>
<altmember cref="M:System.Globalization.GregorianCalendar.ToFourDigitYear(System.Int32)" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.