Hi all
I have built a human resources solution which is perfect apart from one nagging hurdle that I have stumbled on.
I have a leave table which calculates time off for holiday and sickness for each employee. It works fine in the sense that it works out how many days elapse between the beginning of leave and the end. It does not however make any provision for weekends or public holidays. I am beginning to think that I am going to have to put each day off into an array and count off how many days are in the array that are not [0,6] (Sunday and Saturday). Trouble is that in a calculation, I don’t know how to do this. I also don’t know how to approach the question of public holidays. Can these be calculated (I guess Easter would be a problem).
Has anyone had to tackle these problems and if so, I’d be grateful to know the approach you used. I’m happy to work it out, just need a pointer in the right direction to get started…
Thanks
Bevil