The right way to solve this problem is to find the exact thing you want - the precise last weekday of the month, the precise first weekday, and a precise weekday average - which is trivial with any decent date/time library. These would be the RIGHT kind of gymnastics. Tallying information by day and then running some kind of regression to approximate last-day traffic is a waste when you can just GET the last-day traffic.