function @GetNextBusinessDay():string
define(&res, string, '')
define(&today, string, '')
define(&today_long, string, '')
define(&days_to_add, integer, 0)
% Today's date in short date format. This function assumes
% your system's short date is in DD/MM/YYYY format.
&today := date(false)
% Today's date in long date format. Make sure it includes
% the name of the day.
&today_long := date(true)
% Number of days to add to get the next business day. If we're on
% Friday, we need to add 3. If we're on Saturday, we need to add 2.
% For all other days, we simply add 1.
if(pos('Friday', &today_long) > 0)
&days_to_add := 3
elseif(pos('Saturday', &today_long) > 0)
&days_to_add := 2
else
&days_to_add := 1
endif()
% Use "@AddDaysToDate" to add days to today's date.
&res := @AddDaysToDate(&today, 'DD/MM/YYYY', &days_to_add)
% Return the result.
&Result := &res
endfunction()
_________________________
Dan Lixie
Archway
734-713-2417