Add duration to tasks that overlap holiday

@Christiaan_Huizer, @Scott_Collier-Weir — folks, last time I checked, Workday() accepted the list of holidays to jump over as the third param.

So the correct answer would be:

Workday(Start date, Duration, List(HD1, HD2, ...))

where the list can, of course, be taken from anywhere, e.g. a column on an external table:

You’ll have to be careful with durations though: 7 days would now mean “7 work days” exactly, i.e. Workday() would automatically jump over the weekends for you.

I used to solve a more complicated variant of this some time ago. It had flexible availability rules, e.g. custom days off, half-days and so on. The post also explains why the algo to add duration and then add the number of holidays within that range won’t work: the days that the new end date falls on can also be holidays, so you’d have to shift the end date further, which you cannot do without a while loop or a different algo.

Cheers, and welcome to the community, @Kit_Kollmeyer !


P.S. @Scott_Collier-Weir, in Coda dates are basically numbers. Those are 1/1/1900-based indices like in Excel, i.e. each date is stored as the number of days since 1/1/1900 inclusively. And fractions represent time of the day. That’s why you can interchangeably compare dates and numbers and do math and make sequences on dates.

1 Like