ComponentOne True DBInput Pro 8.0
AdjustDate Method (TDBHolidayX)

 

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

AdjustDate Method (TDBHolidayX)

The AdjustDate method is used to adjust to the previous or next working day when the specified date lands on a holiday. Holidays can be either a holiday defined in a holiday style or a weekend rest specified using the WeekRests() property.

Syntax

object.AdjustDate ([Date], [Option])

Arguments

date is an optional variant used to specify the date to adjust; the adjusting will take effect when date is a weekend or a holiday. When not specified, the date in the Value property will be used.

option is an optional constant used to specify whether to pickup the previous / next working day. When not specified, the date will be adjusted to the next working day.

Valid settings for the option argument are:

0

Adjust to the previous working day.

1

Adjust to the next working day. (Default)

Return Value

A date value representing the adjusted date, or Null if the specified date was Null or could not be adjusted.

Remarks

This method is very handy, and can be used in many places. For example, just say the pay day for your company was set to the 20th of every month. In case the 20th lands on a weekend or holiday, you can avoid paying your employees a few days late.

Since the date argument is an optional argument, if not specified the date in the Value property will be used instead.

See Also

WeekRests Property (TDBHolidayX)

 

 


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

Product Support Forum  |  Documentation Feedback