X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ftime-date.el;h=4c0fa3866b42b70a7b688f3a5d442810dc8ec84a;hb=refs%2Ftags%2Ft-gnus-6_15_0-02-quimby;hp=7d934e6cdcb1d673bd8e39b44a114dd100db0b3b;hpb=9217aff8d8aacbcd97015c1fc21a91adbdc0b869;p=elisp%2Fgnus.git- diff --git a/lisp/time-date.el b/lisp/time-date.el index 7d934e6..4c0fa38 100644 --- a/lisp/time-date.el +++ b/lisp/time-date.el @@ -131,6 +131,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.