public static int WeeksInYear(
int year,
DayOfWeek dow
)
Public Shared Function WeeksInYear (
year As Integer,
dow As DayOfWeek
) As Integer
public:
static int WeeksInYear(
int year,
DayOfWeek dow
)
static member WeeksInYear :
year : int *
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 and 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.