public static int WeekFromDate(
DateTime weekDate,
DayOfWeek dow
)
Public Shared Function WeekFromDate (
weekDate As DateTime,
dow As DayOfWeek
) As Integer
public:
static int WeekFromDate(
DateTime weekDate,
DayOfWeek dow
)
static member WeekFromDate :
weekDate : DateTime *
dow : DayOfWeek -> int
A week is defined as a seven day period starting on the specified day of the week. The first week of the year is defined as the one starting on the specified day of the week containing at least four days of the year.
Not all years will have a 53rd week. For example, assuming a Monday week start, week 53 can only occur when Thursday is January 1st or if it is a leap year and Wednesday is January 1st.