Calculate the differences between two dates