ComponentOne True DBInput Pro 8.0
DaysInRange Method (TDBHolidayX)

 

Reference> TDBHolidayX Object> TDBHolidayX Object Methods> DaysInRange Method (TDBHolidayX)

DaysInRange Method (TDBHolidayX)

The DaysInRange method retrieves the number of holidays, weekends or working days in a specified range. This method comes in handy when you need either all of the working days or holidays in a particular range.

Syntax

object.DaysInRange ([Date1], Date2, [Type])

Arguments

date1 is an optional Variant(Date), that is beginning date of the range. When not specified, the date in the Value property will be used.

date2 is a required Variant(Date) that is the ending date of the range.

type is an optional constant. Specify the type of day (holidays/workdays) to retrieve. When not specified, holidays will be retrieved by default.

Valid settings for the type argument are:

0

Holiday (Default)

1

Workday

2

Weekend

Return Value

A long integer representing the number of holidays, workdays, and so on found in the range. If 0 or greater, the call was successful; if -1, the call failed because either date1 or date2 was Null.

Remarks

The span range between date1 and date2 can not be set larger than 1000 years. It may affect the speed.

See Also

DatesInRange Method (TDBHolidayX)

IsDateInStyle Method (TDBHolidayX)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback