Calculates difference in date for timer