Fixed Days of Month Count

Error with certain DS and DE amounts, revised code.