Added the date difference function