Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Adding Business days to DateTime using BusniessHours
public static Datetime addBusinessDays(Datetime startDate, Integer numberOfDays, id busniesshourId)
Integer count = 0;
while (count < days) {
startDate = startDate.addDays(1);
if (BusinessHours.isWithin(businesshourId, startDate))
return startDate;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.