Updated the dates logic for trhe prior month captures