How to Calculate Working Days Excluding Sunday from current month to next 18 months

0
can someone please explain how to calculate the working days excluding Sundays? i have to calculate working days from current month to next 18 months means till July 2025 i need working days for every month. if have any expression its good otherwise can some one explain microflow with image
asked
1 answers
0

This problem seems trivial at first, but turns out to be very complicated. Most people trying to solve this start out with thinking that you can just divide by 7 and multiply by 5 and accounting for the remainder. But then you realize you need to account for national holidays, in al countries that your app is used, for all future dates, and potentially for dates in the past.

 

My advice, choose one of these options:

  1. Use the Working Days module. Once you have the after startup microflow configured, you will have a list of days where all weekend days are non-working days and you can mark off national holidays by hand. The module has a microflow action that you can use to calculate the workingdays between two dates.
  2. Use the workingdays.org api or the timeanddate.com api to do the heavy lifting for you by creating an account and using the REST call. This saves you some work but might cost you some money.
  3. Implement your own solution. This will likely require some Java programming here and there and you would need to get a calendar from a source you trust.

Which option fits you best will depend on how often you need to do the calculation, how much time you want to spend maintaining a list of public holidays and how comfortable you are with coding things in a language like Java.

answered