Get Week OfYear(DateTime) Method
Calculates the ISO week number of a given Gregorian date.
public: static int GetWeekOfYear(DateTime date);
public static int GetWeekOfYear (DateTime date);
static member GetWeekOfYear : DateTime -> int
Public Shared Function GetWeekOfYear (date As DateTime) As Integer
A date in the Gregorian calendar.
A number between 1 and 53 representing the ISO week number of the given Gregorian date.
The returned ISO week number can belong to an ISO year that is different from the input Gregorian year. For example, the Gregorian date 2005-01-01 will have ISO week number 53 but ISO year 2004.
To get the ISO week-numbering year (also called the ISO year informally), call GetYear(DateTime)