calculates time between two specified dates
