Calculate the number of days