Domino Code Fragment

Code Name*
WeekEnding
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.221.53.209
Description*
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
This code also: Takes into account that the @Weekday function assumes the week ends on Saturday. Uses the modifier field to set the end of the week calculation to Sunday.
Files/Graphics attachments (if applicable): Code:
FIELD CalcWeekEnding := test;
CalcWeekEnding := @Adjust(CalcWeekEnding; 0; 0; 9 - @Weekday(CalcWeekEnding); 0; 0; 0);
FIELD test := CalcWeekEnding;


The above does the following:

FIELD CalcWeekEnding := test;
Modifier := @IF(@WeekDay(CalcWeekEnding) = 1; 1; 9 - @Weekday(CalcWeekEnding));
CalcWeekEnding := @Adjust(CalcWeekEnding; 0; 0; Modifier; 0; 0; 0);
FIELD test := CalcWeekEnding;