Function nthWeekDayOfMonth

  • Returns the nth instance of the given weekday in the given month; throws if not found

    Parameters

    • year: number

      The year

    • month: number

      the month 1-12

    • weekDay: WeekDay

      the desired week day

    • dayInstance: number

      the desired week day instance, n

    Returns number

    the first occurrence of the week day in the month

    Throws

    timezonecomplete.Argument.Year for invalid year (non-integer)

    Throws

    timezonecomplete.Argument.Month for invalid month

    Throws

    timezonecomplete.Argument.WeekDay for invalid week day

    Throws

    timezonecomplete.Arugment.DayInstance for invalid day instance (not 1-5)

    Throws

    timezonecomplete.NotFound if the month has no such instance (i.e. 5th instance, where only 4 exist)