Would it be possible to have an Add/Subtract number of workdays function?
Here is the use case. Our company performs equipment installations that have specific stages for milestones. I need to be able to forecast how shifting schedules, pull-in priorities, push out delays will effect milestones as well as final completion. But there are instances where work is not performed on weekends.
I know we have a workdays function that calculates the number of workdays between two dates. But I am looking for something that starts off with a single date and then calculates the new date based on how many workdays I would like to add/subtract. In my time zone today is Wednesday 2026-07-29 and if I wanted to say add 9 workdays to that it would be 2026-08-11 even though there is a total of 13 days difference.
You can do so with standard easymorph functions. Assuming the variables are SomeDate, NumWorkdays, and WorkdaysInWeek (4, 5 or 6, depending on whether Friday and Saturday count as a workday in your country/company), the logic is (sorry, can't prvide easymorph code, as I'm on holiday):
Thank you for taking the time out of your day to write this up. And on your holiday none the less.
I will try to play around with this method a bit.
I imagine trying to account for national holidays would get a bit muddy and I don't have a specific use case for holidays at the moment. But it may good to have for posterity at some point.
Please have an excellent rest of your holiday. I hope you are somewhere nice and with good people!
It depends. What I’ve done so far (which is also not entirely without effort): I load the data via API. In Germany, for example, there is https://www.api-feiertage.de/. You can select both the nationwide valid holidays and the holidays for each federal state. That way you can determine the holidays quite easily. I'm sure that there are such pages for your region, too.
Another option: if you have an ERP system like SAP, you can extract these informations from the fabric calendar.
Thank you for the reply! Yes, I handle regions in both the US and Japan and the holidays can become complicated. Though, I think I can either pull it from SAP (wonder if our MM guys have this somewhere lol). But I imagine getting specific holiday days to work with the above formula may be pretty tricky.
Now that I thinking about this some more, I am wondering if another method to handle this would be to create a separate module and generating a calendar with some kind of range and then using the weekend flag to filter out those records. And then removing holiday days and enumerating the rows and keeping just the record where the enumerated value matches the number of workdays I am looking to add/subtract.
Anyway, thank for the idea and getting me thinking about alternative methods!
Just in case, the workdays() function has two optional arguments - "dates to exclude" and "dates to include". The "dates to exclude" can contain a comma-separated list of dates, such as public holidays, that should be excluded when counting workdays.