Fixed issue with prev_days not handling weekends properly

Main code rev. 2002