nextBusDate Method

Class: Date

Description

This method returns the next business date that is a number of days past the specified date. For example, if the specified date is January 4, 2005 and the numberOfDays is 10, the next business date is January 14, 2005 (assuming January 14 is a business day in the specified business date calendar).

Syntax

dateObject.nextBusDate(Number numberDays,String calendar)

Parameters

numberDays

The number of business days to add to the specified date. The default is 1.

calendar

The calendar name. The default is IBS.

Returns

A Date object that represents the date that is a specified number of business days later than this Date (according to the specified business calendar).

When Became Available

Profile v7.0

Example

type RecordCIF cif = Db.getRecord("CIF","ACN=:ACN")

type Date date = cif.dob               // declare Date object

type String birthStr = date.month() _ "/" _ date.day()

if birthStr = "02/29",'(%SystemDate.isLeapYear()) do {

set birthStr = "02/28"

}

set birthStr = birthStr _ "/" _ %SystemDate.year()

type Date birthday = birthStr.toDate()

type Date inviteAt = birthday.nextBusDay()

type Date invite1D = birthday.nextBusDay(1,"IBS")

 

* Variable ACN must be defined prior to the getRecord statement.