Reference > TDBHolidayX Object > TDBHolidayX Object Methods > LastInMonth Method (TDBHolidayX) |
LastInMonth Method (TDBHolidayX)
The LastInMonth method retrieves the last working day, holiday or weekend in the month for the specified date. This method is used together with the FirstInMonth method, which retrieves the first day of the specified type in the month.
object.LastInMonth ([Date], [Type])
date is an optional variant: the base date to retrieve the last 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 |
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.
See Also
LastInWeek Method (TDBHolidayX)