Fixes a rounding issue when calculating the number of days.