Domino Code Fragment

Code Name*
Elapsed working days
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.144.77.71
Description*
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
REM "Subtracts weekend days";
REM "WARNING:: you should verify that firstdate and nextdate are not Sat. or Sun.";
REM "Required Field(s): NextDate, FirstDate ";
temp := (@Date(nextdate) - @Date(firstdate)) / 86400;
weekend_days := @Integer((temp / 7)) * 2;
wkday := @Weekday(firstdate);
adjust := @If(((wkday + @Modulo(temp; 7) - 7) > 0); 2; 0);
working_days := temp - (weekend_days + adjust);
working_days