ComponentOne MultiSelect for WinForms
C1.Globalization Namespace / JapaneseCalendarEx Class / GetWeekOfYear Method
A date and time value.
An enumeration value that defines a calendar week.
An enumeration value that represents the first day of the week.

In This Topic
    GetWeekOfYear Method
    In This Topic
    Returns the week of the year that includes the date in the specified System.DateTime value.
    Syntax
    'Declaration
     
    
    Public Overrides Function GetWeekOfYear( _
       ByVal time As Date, _
       ByVal rule As CalendarWeekRule, _
       ByVal firstDayOfWeek As DayOfWeek _
    ) As Integer
    public override int GetWeekOfYear( 
       DateTime time,
       CalendarWeekRule rule,
       DayOfWeek firstDayOfWeek
    )

    Parameters

    time
    A date and time value.
    rule
    An enumeration value that defines a calendar week.
    firstDayOfWeek
    An enumeration value that represents the first day of the week.

    Return Value

    A positive integer that represents the week of the year that includes the date in the time parameter.
    Exceptions
    ExceptionDescription
    time is earlier than System.Globalization.Calendar.MinSupportedDateTime or later than System.Globalization.Calendar.MaxSupportedDateTime. -or- firstDayOfWeek is not a valid System.DayOfWeek value. -or- rule is not a valid System.Globalization.CalendarWeekRule value.
    See Also