ISOWeek.GetWeekOfYear(DateTime) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Parameters
- date
- DateTime
A date in the Gregorian calendar.
Returns
A number between 1 and 53 representing the ISO week number of the given Gregorian date.
Remarks
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)
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om