Skip to content

Commit 179cd0d

Browse files
authored
Remove incorrect info about default calendar restriction (#45764)
1 parent 61e9f10 commit 179cd0d

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: System.Globalization.PersianCalendar class
33
description: Learn more about the System.Globalization.PersianCalendar class.
4-
ms.date: 12/28/2023
4+
ms.date: 04/09/2025
55
ms.topic: conceptual
66
---
77
# <xref:System.Globalization.PersianCalendar> class
@@ -19,24 +19,18 @@ The Persian calendar is based on a solar year and is approximately 365 days long
1919

2020
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.
2121

22-
## The PersianCalendar class and .NET Framework versions
22+
## The PersianCalendar class and .NET versions
2323

2424
Starting with .NET Framework 4.6, 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 .NET Framework 4 or later if .NET Framework 4.6 is installed.
2525

2626
As a result of the changed algorithm:
2727

2828
- The two algorithms should return identical results when converting dates between 1800 and 2123 in the Gregorian calendar.
29-
30-
- The two algorithms might return differentresults when converting dates before 1800 and after 2123 in the Gregorian calendar.
31-
32-
- 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.
33-
34-
- 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.
35-
36-
- The <xref:System.Globalization.PersianCalendar.IsLeapYear%2A> method may return a different result than it did previously.
29+
- The two algorithms might return different results when converting dates before 1800 and after 2123 in the Gregorian calendar.
30+
- The <xref:System.Globalization.PersianCalendar.MinSupportedDateTime> property value has changed from March 21, 0622 in the Gregorian calendar to March 22, 0622 in the Gregorian calendar.
31+
- The <xref:System.Globalization.PersianCalendar.MaxSupportedDateTime> 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.
32+
- The <xref:System.Globalization.PersianCalendar.IsLeapYear%2A> method might return a different result than it did previously.
3733

3834
## Use the PersianCalendar class
3935

40-
Applications use a <xref:System.Globalization.PersianCalendar> object to calculate dates in the Persian calendar or convert Persian dates to and from Gregorian dates.
41-
42-
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.
36+
You can use a <xref:System.Globalization.PersianCalendar> object to calculate dates in the Persian calendar or convert Persian dates to and from Gregorian dates. The Persian calendar is the [default calendar](xref:System.Globalization.CultureInfo.Calendar) for cultures such as Persian (Afghanistan) and Central Kurdish (Iran).

0 commit comments

Comments
 (0)