These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculating a date on a termination form

ChelseaWF
Registered: Sep 17 2011
Posts: 6

Hi, apologies if this has been covered but i can't find any details on the forums. Also a bit of a bumbling newbie, so aplogies if this is inconcise
 
I want to calculate the last date payable on a staff termination form I have designed. The calculation should be last day worked (entered by calendar) & an additional field detailing the annual leave owing, which should then calculate the final date payable. There is an additional complication that the calculation should ignore weekends. Is this possible?
 
Ie last date worked Friday 16 Sep
6 days annual leave
= last day payable of Monday 26 Sept.
 
Any thoughts?

My Product Information:
LiveCycle Designer, Windows
maxwyss
Registered: Jul 25 2006
Posts: 255
This is indeed possible. It does work for "regular" off-days (Saturday, Sunday), but would require additional logic for general holidays.

One way to do it would be beginning with the date of the last day worked, and then counting up day by day. You have a day counter which you increase only if the day of the week is a working day (date.getDay() is your firend). When you have reached the number of annual leave days, you have the date of the last payable day…

Hope this can help.

Max Wyss.