ComponentOne True DBInput Pro 8.0
FirstInWeek Method (TDBHolidayX)

 

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

FirstInWeek Method (TDBHolidayX)

The FirstInWeek method retrieves the first working day, holiday or weekend in the week for the specified date. This method is used together with the LastInWeek method which retrieves the last day of the specified type in the week.

Syntax

object.FirstInWeek ([Date], [Type])

Arguments

date is an optional variant: the base date to retrieve the first workday, and so on in week. When not specified, the date in the Value property will be used.

type is an optional constant that specifies 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

An appropriate date value based on the specified type, or Null if the passed-in date was Null or the specified type of days was not found.

Remarks

Days for previous or next week can be retrieved using the methods provided in the TDBDateX object. These methods can retrieve dates based on the weekday.

The return date value will be effected by the StartOfWeek property which determines the first day of a week.

See Also

FirstInMonth Method (TDBHolidayX)

FirstInYear Method (TDBHolidayX)

 

 


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

Product Support Forum  |  Documentation Feedback