WebCab Bonds for .NET v2.01

AbstractBusinessCalendar.daysOfWeekBetween Method 

Calculates the number of a certain day of the week which lies between two dates. For example, if the start date is 1 Jan 2003 and the end date is 31 Dec 2003, and the day of the week we select is Monday then the method will return 52. This is because the number of Monday's between the start date 1 Jan 2003, and the end date 31 Dec 2003, including the end dates is 52.

public virtual int daysOfWeekBetween(
   int dayOfWeek,
   DateTime start,
   DateTime end
);

Parameters

dayOfWeek
a day of the week, namely one of the following Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. We reference these fields using the following Calendar.MONDAY,...,Calendar.SUNDAY.
start
the start date of the period over which the number of a certain day will be counted.
end
the end date of the period over which the number of a certain day will be counted.

Return Value

the number of a certain day of week which lies between two dates @throws IllegalArgumentException thrown if either the start date is strictly after the end date or if the dayOfWeek is not selected from one of the following days of the week: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

Implements

BusinessCalendar.daysOfWeekBetween

See Also

AbstractBusinessCalendar Class | WebCab.BusinessCalendar Namespace | DaysOfWeekBetween