[]
Returns the week of the year that includes the date in the specified DateTime object.
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
Public Overrides Function GetWeekOfYear(time As Date, rule As CalendarWeekRule, firstDayOfWeek As DayOfWeek) As Integer
| Type | Name | Description |
|---|---|---|
| DateTime | time | The DateTime object to read. |
| CalendarWeekRule | rule | One of the CalendarWeekRule values that defines a calendar week. |
| DayOfWeek | firstDayOfWeek | One of the DayOfWeek values that represents the first day of the week. |
| Type | Description |
|---|---|
| int | A 1-based integer that represents the week of the year that includes the date in the time parameter. |
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | time or firstDayOfWeek is outside the range supported by the calendar. -or- rule is not a valid CalendarWeekRule value. |