Back to Devexpress

RepositoryItemDateEdit.WeekNumberRule Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemdateedit-eb400277.md

latest3.2 KB
Original Source

RepositoryItemDateEdit.WeekNumberRule Property

Gets or sets a rule which determines the first week of the year.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(WeekNumberRule.Default)]
[DXCategory("Behavior")]
public virtual WeekNumberRule WeekNumberRule { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(WeekNumberRule.Default)>
Public Overridable Property WeekNumberRule As WeekNumberRule

Property Value

TypeDefaultDescription
WeekNumberRuleDefault

A WeekNumberRule enumeration value which determines the first week of the year.

|

Available values:

NameDescription
Default

The rule specified by the System.Globalization.DateTimeFormatInfo.CalendarWeekRule property which defines a calendar week for a specific culture.

| | FirstDay |

Indicates that the first week of the year starts on the first day of the year and ends before the following designated first day of the week.

| | FirstFullWeek |

Indicates that the first week of the year begins on the first occurrence of the designated first day of the week on or after the first day of the year.

| | FirstFourDayWeek |

Indicates that the first week of the year is the first week with four or more days before the designated first day of the week.

|

Remarks

Use the WeekNumberRule property to define a rule for determining the first week of the year. The rules available are listed in the table below:

ValueDescription
DefaultThe rule specified by the CalendarWeekRule property which defines a calendar week for a specific culture. This value is -1.
FirstDayIndicates that the first week of the year starts on the first day of the year and ends before the following designated first day of the week. The value is 0.
FirstFullWeekIndicates that the first week of the year begins on the first occurrence of the designated first day of the week on or after the first day of the year. The value is 1.
FirstFourDayWeekIndicates that the first week of the year is the first week with four or more days before the designated first day of the week. The value is 2.

See Also

RepositoryItemDateEdit Class

RepositoryItemDateEdit Members

DevExpress.XtraEditors.Repository Namespace