From ba082a407f40d1dec4b723423c9e82284ab1740d Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Fri, 5 Jan 2001 05:52:44 +0000 Subject: [PATCH] * time-date.el (time-to-number-of-days): New function. --- lisp/ChangeLog | 4 ++++ lisp/time-date.el | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3930aa844..03c5b2352 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2001-01-05 06:49:37 Lars Magne Ingebrigtsen + + * time-date.el (time-to-number-of-days): New function. + 2001-01-04 11:06:14 Gregory Chernov * nnslashdot.el (nnslashdot-request-list): Always get the right diff --git a/lisp/time-date.el b/lisp/time-date.el index 3bfb9a454..be02f9448 100644 --- a/lisp/time-date.el +++ b/lisp/time-date.el @@ -129,6 +129,11 @@ The Gregorian date Sunday, December 31, 1bce is imaginary." (- (/ (1- year) 100)) ; - century years (/ (1- year) 400)))) ; + Gregorian leap years +(defun time-to-number-of-days (time) + "Return the number of days represented by TIME. +The number of days will be returned as a floating point number." + (/ (+ (* 1.0 65536 (car time)) (cadr time)) (* 60 60 24))) + ;;;###autoload (defun safe-date-to-time (date) "Parse DATE and return a time structure. -- 2.34.1