DateTimeFormatInfo.CalendarWeekRule Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets a value that specifies which rule is used to determine the first calendar week of the year.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.Globalization.CalendarWeekRuleA CalendarWeekRule value that determines the first calendar week of the year. The default for InvariantInfo is FirstDay.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | An attempt was made to set the property to a value that is not a valid CalendarWeekRule value. |
| InvalidOperationException | The DateTimeFormatInfo object is read-only. |
The calendar week rule, together with the FirstDayOfWeek property, defines the date ranges of the weeks of the year,
This property is affected if the value of the Calendar property changes.