Friday 4 March 2016

Algorithm to find next 10 Business Day

The factors

How many week days per week? This depends on the company/country policies. In the US, it's generally 5 days per week, whereas in India and in many other countries, many companies work for 6 days a week. Our algorithm needs to take that into consideration.

Basic algorithm

  1. Calculate the number of time span in terms of weeks. Call it, W
  2. Deduct the first and last week from the number of weeks. W= W-2
  3. Take number of working day's as WRK
  4. Sum up all the days W+WRK

Lets see it how it work in program

No comments:

Post a Comment