How to calculate the difference between two dates and a fee based on those dates