Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1530 lines (1397 sloc) 89.8 KB
<Type Name="PersianCalendar" FullName="System.Globalization.PersianCalendar">
<TypeSignature Language="C#" Value="public class PersianCalendar : System.Globalization.Calendar" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit PersianCalendar extends System.Globalization.Calendar" />
<TypeSignature Language="DocId" Value="T:System.Globalization.PersianCalendar" />
<TypeSignature Language="VB.NET" Value="Public Class PersianCalendar&#xA;Inherits Calendar" />
<TypeSignature Language="C++ CLI" Value="public ref class PersianCalendar : System::Globalization::Calendar" />
<TypeSignature Language="F#" Value="type PersianCalendar = 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>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>
<AssemblyVersion>4.2.2.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;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the Persian calendar.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The Persian calendar is used in most countries/regions where Persian is spoken, although some regions use different month names. The Persian calendar is the official calendar of Iran and Afghanistan, and it is one of the alternative calendars in regions such as Kazakhstan and Tajikistan.
> [!NOTE]
> For information about using the <xref:System.Globalization.PersianCalendar> class and the other calendar classes in the .NET Framework, see [Working with Calendars](~/docs/standard/datetime/working-with-calendars.md).
Dates in the Persian calendar start from the year of the Hijra, which corresponds to 622 C.E. and is the year when Muhammad (PBUH) migrated from Mecca to Medina. For example, the date March 21, 2002 C.E. corresponds to the first day of the month of Farvardeen in the year 1381 Anno Persico.
The Persian calendar is based on a solar year and is approximately 365 days long. A year cycles through four seasons, and a new year begins when the sun appears to cross the equator from the southern hemisphere to the northern hemisphere as viewed from the center of the Earth. The new year marks the first day of the month of Farvardeen, which is the first day of spring in the northern hemisphere.
Each of the first six months in the Persian calendar has 31 days, each of the next five months has 30 days, and the last month has 29 days in a common year and 30 days in a leap year. A leap year is a year that, when divided by 33, has a remainder of 1, 5, 9, 13, 17, 22, 26, or 30. For example, the year 1370 is a leap year because dividing it by 33 yields a remainder of 17. There are approximately eight leap years in every 33-year cycle.
## The PersianCalendar class and .NET Framework versions
Starting with the [!INCLUDE[net_v46](~/includes/net-v46-md.md)], the <xref:System.Globalization.PersianCalendar> class uses the Hijri solar astronomical algorithm rather than an observational algorithm to calculate dates. This makes the <xref:System.Globalization.PersianCalendar> implementation consistent with the Persian calendar in use in Iran and Afghanistan, the two countries in which the Persian calendar is in most widespread use. The change affects all apps running on the .NET Framework 4 or later if the [!INCLUDE[net_v46](~/includes/net-v46-md.md)] is installed.
As a result of the changed algorithm:
- The two algorithms should return identical results when converting dates between 1800 and 2123 in the Gregorian calendar.
- The two algorithms may return different results when converting dates before 1800 and after 2123 in the Gregorian calendar.
- The <xref:System.Globalization.PersianCalendar.MinSupportedDateTime%2A> property value has changed from March 21, 0622 in the Gregorian calendar to March 22, 0622 in the Gregorian calendar.
- The <xref:System.Globalization.PersianCalendar.MaxSupportedDateTime%2A> property value has changed from the 10th day of the 10th month of the year 9378 in the Persian calendar to the 13th day of the 10th month of the year 9378 in the Persian calendar.
- The <xref:System.Globalization.PersianCalendar.IsLeapYear%2A> method may return a different result than it did previously.
## Using the PersianCalendar class
Applications use a <xref:System.Globalization.PersianCalendar> object to calculate dates in the Persian calendar or convert Persian dates to and from Gregorian dates.
You cannot use a <xref:System.Globalization.PersianCalendar> object as the default calendar for a culture. The default calendar is specified by the <xref:System.Globalization.CultureInfo.Calendar%2A?displayProperty=nameWithType> property and must be one of the calendars returned by the <xref:System.Globalization.CultureInfo.OptionalCalendars%2A?displayProperty=nameWithType> property. Currently, the <xref:System.Globalization.PersianCalendar> class is not an optional calendar for any culture supported by the <xref:System.Globalization.CultureInfo> class and consequently cannot be a default calendar.
## Examples
The following example instantiates <xref:System.DateTime> objects by using the <xref:System.DateTime.Now%2A?displayProperty=nameWithType> property, a <xref:System.DateTime> constructor, and the Persian calendar's <xref:System.Globalization.Calendar.ToDateTime%28System.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%2CSystem.Int32%29> method. It then displays these dates in both the Gregorian and Persian calendars. It also displays the date range of the Persian calendar.
[!code-csharp[sys.glob.PersianCal#3](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/calendar2.cs#3)]
[!code-vb[sys.glob.PersianCal#3](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/calendar2.vb#3)]
The following example demonstrates the field, property, and method members of the <xref:System.Globalization.PersianCalendar> class.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.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>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PersianCalendar ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Globalization.PersianCalendar.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; PersianCalendar();" />
<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>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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Globalization.PersianCalendar" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the constructor for the <xref:System.Globalization.PersianCalendar> class.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 positive or negative number of months to add.</param>
<summary>Returns a <see cref="T:System.DateTime" /> object that is offset the specified number of months from the specified <see cref="T:System.DateTime" /> object.</summary>
<returns>A <see cref="T:System.DateTime" /> object that represents the date yielded by adding the number of months specified by the <paramref name="months" /> parameter to the date specified by the <paramref name="time" /> parameter.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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 demonstrates the use of the <xref:System.Globalization.PersianCalendar.AddMonths%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.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 -120,000 or greater than 120,000.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="M:System.Globalization.PersianCalendar.AddYears(System.DateTime,System.Int32)" />
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 positive or negative number of years to add.</param>
<summary>Returns a <see cref="T:System.DateTime" /> object that is offset the specified number of years from the specified <see cref="T:System.DateTime" /> object.</summary>
<returns>The <see cref="T:System.DateTime" /> object that results from adding the specified number of years to the specified <see cref="T:System.DateTime" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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 demonstrates the use of the <xref:System.Globalization.PersianCalendar.AddYears%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.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="years" /> is less than -10,000 or greater than 10,000.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="M:System.Globalization.PersianCalendar.AddMonths(System.DateTime,System.Int32)" />
</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.PersianCalendar.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.PersianCalendar.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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Globalization.CalendarAlgorithmType</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the current calendar is solar-based, lunar-based, or lunisolar-based.</summary>
<value>Always returns <see cref="F:System.Globalization.CalendarAlgorithmType.SolarCalendar" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A date calculation for a particular calendar depends on whether the calendar is solar-based, lunar-based, or lunisolar-based.
## 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="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.PersianCalendar.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.PersianCalendar.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>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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the list of eras in a <see cref="T:System.Globalization.PersianCalendar" /> object.</summary>
<value>An array of integers that represents the eras in a <see cref="T:System.Globalization.PersianCalendar" /> object. The array consists of a single element having a value of <see cref="F:System.Globalization.PersianCalendar.PersianEra" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.Eras%2A> property.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.PersianCalendar.PersianEra" />
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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" /> object.</summary>
<returns>An integer from 1 through 31 that represents the day of the month in the specified <see cref="T:System.DateTime" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetDayOfMonth%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
<altmember cref="P:System.DateTime.Day" />
<altmember cref="M:System.Globalization.PersianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfWeek(System.DateTime)" />
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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" /> object.</summary>
<returns>A <see cref="T:System.DayOfWeek" /> value that represents the day of the week in the specified <see cref="T:System.DateTime" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetDayOfWeek%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.DateTime.DayOfWeek" />
<altmember cref="T:System.DayOfWeek" />
<altmember cref="M:System.Globalization.PersianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfYear(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfMonth(System.DateTime)" />
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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" /> object.</summary>
<returns>An integer from 1 through 366 that represents the day of the year in the specified <see cref="T:System.DateTime" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetDayOfYear%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
<altmember cref="P:System.DateTime.DayOfYear" />
<altmember cref="M:System.Globalization.PersianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfMonth(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfWeek(System.DateTime)" />
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="month">An integer that represents the month, and ranges from 1 through 12 if <paramref name="year" /> is not 9378, or 1 through 10 if <paramref name="year" /> is 9378.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Returns the number of days in the specified month of the specified year and era.</summary>
<returns>The number of days in the specified month of the specified year and era.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetDaysInMonth%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="M:System.Globalization.PersianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Returns the number of days in the specified year of the specified era.</summary>
<returns>The number of days in the specified year and era. The number of days is 365 in a common year or 366 in a leap year.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates use of the <xref:System.Globalization.PersianCalendar.GetDaysInYear%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="M:System.Globalization.PersianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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" /> object.</summary>
<returns>Always returns <see cref="F:System.Globalization.PersianCalendar.PersianEra" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetEra%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="F:System.Globalization.PersianCalendar.PersianEra" />
<altmember cref="P:System.Globalization.PersianCalendar.Eras" />
</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.PersianCalendar.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="persianCalendar.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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year to convert.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Returns the leap month for a specified year and era.</summary>
<returns>The return value is always 0.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetLeapMonth%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar.</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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" /> object.</summary>
<returns>An integer from 1 through 12 that represents the month in the specified <see cref="T:System.DateTime" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetMonth%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
<altmember cref="P:System.DateTime.Month" />
<altmember cref="M:System.Globalization.PersianCalendar.GetYear(System.DateTime)" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfMonth(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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Returns the number of months in the specified year of the specified era.</summary>
<returns>Returns 10 if the <paramref name="year" /> parameter is 9378; otherwise, always returns 12.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetMonthsInYear%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="M:System.Globalization.PersianCalendar.GetMonth(System.DateTime)" />
</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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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" /> object.</summary>
<returns>An integer from 1 through 9378 that represents the year in the specified <see cref="T:System.DateTime" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.GetYear%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="time" /> parameter represents a date less than <see cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />.</exception>
<altmember cref="P:System.DateTime.Year" />
<altmember cref="M:System.Globalization.PersianCalendar.GetDayOfYear(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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="month">An integer that represents the month and ranges from 1 through 12 if <paramref name="year" /> is not 9378, or 1 through 10 if <paramref name="year" /> is 9378.</param>
<param name="day">An integer from 1 through 31 that represents the day.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Determines whether the specified date 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 day is a day that occurs only in a leap year.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.IsLeapDay%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" />, <paramref name="month" />, <paramref name="day" />, or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="M:System.Globalization.PersianCalendar.GetDaysInMonth(System.Int32,System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.IsLeapYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="month">An integer that represents the month and ranges from 1 through 12 if <paramref name="year" /> is not 9378, or 1 through 10 if <paramref name="year" /> is 9378.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Determines whether the specified month in the specified year and era is a leap month.</summary>
<returns>Always returns <see langword="false" /> because the <see cref="T:System.Globalization.PersianCalendar" /> class does not support the notion of a leap month.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.IsLeapMonth%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="M:System.Globalization.PersianCalendar.IsLeapYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="era">An integer from 0 through 1 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
Starting with the [!INCLUDE[net_v46](~/includes/net-v46-md.md)], the implementation of the <xref:System.Globalization.PersianCalendar> class has changed from an observational algorithm to the Hijri solar algorithm. As a result, the <xref:System.Globalization.PersianCalendar.IsLeapYear%2A> method may return different values when run on [!INCLUDE[net_v46](~/includes/net-v46-md.md)] than when run on previous versions of the .NET Framework.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.IsLeapYear%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="F:System.Globalization.PersianCalendar.PersianEra" />
<altmember cref="P:System.Globalization.PersianCalendar.Eras" />
<altmember cref="M:System.Globalization.PersianCalendar.IsLeapMonth(System.Int32,System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.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.PersianCalendar.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.PersianCalendar.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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the latest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class.</summary>
<value>The latest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of the <xref:System.Globalization.PersianCalendar.MaxSupportedDateTime%2A> property is the last moment of December 31, 9999 C.E. in the Gregorian calendar. In the [!INCLUDE[net_v46](~/includes/net-v46-md.md)], this value is equivalent to the 13th day of the 10th month of the year 9378 in the Persian calendar. In previous versions of the .NET Framework, it is equivalent to the 10th day of the 10th month of the year 9378 in the Persian calendar. For more information, see "The PersianCalendar class and .NET Framework versions" in the <xref:System.Globalization.PersianCalendar> topic.
9999 C.E. is equivalent to the year 9378 in the Persian calendar.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.MaxSupportedDateTime%2A> property.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Globalization.PersianCalendar.MinSupportedDateTime" />
</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.PersianCalendar.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.PersianCalendar.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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the earliest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class.</summary>
<value>The earliest date and time supported by the <see cref="T:System.Globalization.PersianCalendar" /> class.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Starting with the [!INCLUDE[net_v46](~/includes/net-v46-md.md)], the value of the <xref:System.Globalization.PersianCalendar.MinSupportedDateTime%2A> property is equivalent to the first moment of March 22, 622 C.E. in the Gregorian calendar. In previous versions of the ,NET Framework, it is equivalent to the first moment of March 21, 622 C.E. in the Gregorian calendar. For more information, see "The PersianCalendar class and .NET Framework versions" in the <xref:System.Globalization.PersianCalendar> topic.
622 C.E. is equivalent to the year 0001 in the Persian calendar.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.MinSupportedDateTime%2A> property.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Globalization.PersianCalendar.MaxSupportedDateTime" />
</Docs>
</Member>
<Member MemberName="PersianEra">
<MemberSignature Language="C#" Value="public static readonly int PersianEra;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly int32 PersianEra" />
<MemberSignature Language="DocId" Value="F:System.Globalization.PersianCalendar.PersianEra" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly PersianEra As Integer " />
<MemberSignature Language="C++ CLI" Value="public: static initonly int PersianEra;" />
<MemberSignature Language="F#" Value=" staticval mutable PersianEra : int" Usage="System.Globalization.PersianCalendar.PersianEra" />
<MemberType>Field</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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Represents the current era. This field is constant.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of <xref:System.Globalization.PersianCalendar.PersianEra> is 1.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.PersianEra> property.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.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 from 1 through 9378 that represents the year.</param>
<param name="month">An integer from 1 through 12 that represents the month.</param>
<param name="day">An integer from 1 through 31 that represents the day.</param>
<param name="hour">An integer from 0 through 23 that represents the hour.</param>
<param name="minute">An integer from 0 through 59 that represents the minute.</param>
<param name="second">An integer from 0 through 59 that represents the second.</param>
<param name="millisecond">An integer from 0 through 999 that represents the millisecond.</param>
<param name="era">An integer from 0 through 1 that represents the era.</param>
<summary>Returns a <see cref="T:System.DateTime" /> object that is set to the specified date, time, and era.</summary>
<returns>A <see cref="T:System.DateTime" /> object that is set to the specified date and time in the current era.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Globalization.PersianCalendar.ToDateTime%2A> method is useful because it can convert any date in the current calendar to a Gregorian calendar date. The Gregorian date can subsequently be used, for example, to compare dates in different calendars or create an equivalent date in a particular calendar.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.ToDateTime%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" />, <paramref name="month" />, <paramref name="day" />, <paramref name="hour" />, <paramref name="minute" />, <paramref name="second" />, <paramref name="millisecond" />, or <paramref name="era" /> is outside the range supported by this calendar.</exception>
<altmember cref="T:System.DateTime" />
<altmember cref="F:System.Globalization.Calendar.CurrentEra" />
<altmember cref="F:System.Globalization.PersianCalendar.PersianEra" />
<altmember cref="P:System.Globalization.PersianCalendar.Eras" />
<altmember cref="M:System.Globalization.PersianCalendar.GetMonthsInYear(System.Int32,System.Int32)" />
<altmember cref="M:System.Globalization.PersianCalendar.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.PersianCalendar.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="persianCalendar.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>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>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="year" Type="System.Int32" />
</Parameters>
<Docs>
<param name="year">An integer from 1 through 9378 that represents the year to convert.</param>
<summary>Converts the specified year to a four-digit year representation.</summary>
<returns>An integer that contains the four-digit representation of <paramref name="year" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method converts the `year` parameter to a four-digit year representation using the <xref:System.Globalization.PersianCalendar.TwoDigitYearMax%2A> property. The return value is the upper boundary of a 100-year range that allows a two-digit year to be properly translated to a four-digit year. For example, if the 100-year range is from 1930 through 2029, then a two-digit value of 30 is interpreted as 1930 while a two-digit value of 29 is interpreted as 2029.
<xref:System.Globalization.PersianCalendar.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.PersianCalendar.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.PersianCalendar.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.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.ToFourDigitYear%2A> method.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="year" /> is less than 0 or greater than 9378.</exception>
<altmember cref="P:System.Globalization.PersianCalendar.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.PersianCalendar.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.PersianCalendar.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>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>
<AssemblyVersion>4.2.2.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 in Control Panel. However, that information can change during the life of the <xref:System.AppDomain>. The <xref:System.Globalization.PersianCalendar> class does not detect changes in the system settings automatically. If the calendar is not supported in the regional and language options, the initial value of this property is the default value defined by the calendar class.
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.
## Examples
The following code example demonstrates the use of the <xref:System.Globalization.PersianCalendar.TwoDigitYearMax%2A> property.
[!code-csharp[sys.glob.PersianCal#1](~/samples/snippets/csharp/VS_Snippets_CLR/sys.glob.persianCal/cs/pcal.cs#1)]
[!code-vb[sys.glob.PersianCal#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/sys.glob.persianCal/vb/pcal.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">This calendar is read-only.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">The value in a set operation is less than 100 or greater than 9378.</exception>
<altmember cref="M:System.Globalization.PersianCalendar.ToFourDigitYear(System.Int32)" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.