Calculate Working Days Between Two Days
There may be times when you need to determine the number of working days between two dates. This result can be achieved within ACL by creating a conditional computed field involving multiple ACL functions.
Suppose that start_date and end_date are two date-type fields that are already defined in ACL. Calculating the number of working days between these two dates involves testing for different conditions. For example:
- If the starting date is, for some reason, after the ending date.
- If the starting and ending date both fall on a Saturday or Sunday.
- If either the starting or ending date fall on a Saturday or Sunday.
- If the weekday of the ending date falls before or after the starting date.
- If you need to take into account long weekends or holidays such as Christmas Day, New Year”s Day, and so on.