DateTimeFormatInfo.CalendarWeekRule Property

May 11, 2014

Gets or sets a value that specifies which rule is used to determine the first calendar week of the year.

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public CalendarWeekRule CalendarWeekRule { get; set; }

Property Value

Type: System.Globalization.CalendarWeekRule
A CalendarWeekRule value that determines the first calendar week of the year. The default for InvariantInfo is FirstDay.

ExceptionCondition
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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft