Calendar for WinForms | ComponentOne
C1.Globalization Namespace / JapaneseCalendarEx Class / GetWeekOfYear Method
The System.DateTime object to read.
One of the System.Globalization.CalendarWeekRule values that defines a calendar week.
One of the System.DayOfWeek values that represents the first day of the week.

In This Topic
    GetWeekOfYear Method (JapaneseCalendarEx)
    In This Topic
    Returns the week of the year that includes the date in the specified System.DateTime object.
    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
    The System.DateTime object to read.
    rule
    One of the System.Globalization.CalendarWeekRule values that defines a calendar week.
    firstDayOfWeek
    One of the System.DayOfWeek values that represents the first day of the week.

    Return Value

    A 1-based integer that represents the week of the year that includes the date in the time parameter.
    Exceptions
    ExceptionDescription
    time or firstDayOfWeek is outside the range supported by the calendar. -or- rule is not a valid System.Globalization.CalendarWeekRule value.
    See Also