firstworkdate - script and chart function

The firstworkdate function returns the latest starting date to achieve no_of_workdays (Monday-Friday) ending no later than end_date taking into account any optionally listed holidays. end_date and holiday should be valid dates or timestamps.

Syntax:  

firstworkdate(end_date, no_of_workdays [, holiday] )

Return data type: integer

Arguments:  

Argument Description
end_date The timestamp of end date to evaluate.
no_of_workdays The number of working days to achieve.
holiday

Holiday periods to exclude from working days. A holiday period is stated as a start date and an end date, separated by commas.

Example: '25/12/2013', '26/12/2013'

You can exclude more than one holiday period, separated by commas.

Example: '25/12/2013', '26/12/2013', '31/12/2013', '01/01/2014'