computeDates implementation.