SPIntlCal.GetWeekNumber method
Returns the week number of the specified date in the specified calendar type.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetWeekNumber ( _
calType As SPCalendarType, _
di As SimpleDate, _
FirstDayOfWeek As Integer, _
FirstWeekOfYear As Short _
) As Integer
'Usage
Dim calType As SPCalendarType
Dim di As SimpleDate
Dim FirstDayOfWeek As Integer
Dim FirstWeekOfYear As Short
Dim returnValue As Integer
returnValue = SPIntlCal.GetWeekNumber(calType, _
di, FirstDayOfWeek, FirstWeekOfYear)
public static int GetWeekNumber(
SPCalendarType calType,
SimpleDate di,
int FirstDayOfWeek,
short FirstWeekOfYear
)
Parameters
calType
Type: Microsoft.SharePoint.SPCalendarTypeAn SPCalendarType object that represents a calendar type.
di
Type: Microsoft.SharePoint.Utilities.SimpleDateThe SimpleDate to evaluate.
FirstDayOfWeek
Type: System.Int32A 32-bit integer that represents the first day of the week displayed in the calendar, in the range 0 through 6; where 0 indicates Sunday, 1 indicates Monday, and so on.
FirstWeekOfYear
Type: System.Int16A Short that that represents the first week of the year displayed in the calendar: 0 (the week in which January 1 occurs), 1 (the first week that has at least four days in the new year), or 2 (the first full week of the year).
Return value
Type: System.Int32
An integer value that represents the week number.