/[emacs]/emacs/lisp/calendar/time-date.el
ViewVC logotype

Diff of /emacs/lisp/calendar/time-date.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.4.3 by miles, Sat Sep 4 09:26:22 2004 UTC revision 1.5.4.4 by miles, Thu Sep 16 00:12:21 2004 UTC
# Line 1  Line 1 
1  ;;; time-date.el --- date and time handling functions  ;;; time-date.el --- date and time handling functions
2  ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.  ;; Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
3    
4  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
5  ;;      Masanobu Umeda <umerin@mse.kyutech.ac.jp>  ;;      Masanobu Umeda <umerin@mse.kyutech.ac.jp>
# Line 38  Line 38 
38               (parse-time-string               (parse-time-string
39                ;; `parse-time-string' isn't sufficiently general or                ;; `parse-time-string' isn't sufficiently general or
40                ;; robust.  It fails to grok some of the formats that                ;; robust.  It fails to grok some of the formats that
41                ;; timzeone does (e.g. dodgy post-2000 stuff from some                ;; timezone does (e.g. dodgy post-2000 stuff from some
42                ;; Elms) and either fails or returns bogus values.  Lars                ;; Elms) and either fails or returns bogus values.  Lars
43                ;; reverted this change, but that loses non-trivially                ;; reverted this change, but that loses non-trivially
44                ;; often for me.  -- fx                ;; often for me.  -- fx
# Line 177  The Gregorian date Sunday, December 31, Line 177  The Gregorian date Sunday, December 31,
177         (- (/ (1- year) 100))            ;       - century years         (- (/ (1- year) 100))            ;       - century years
178         (/ (1- year) 400))))             ;       + Gregorian leap years         (/ (1- year) 400))))             ;       + Gregorian leap years
179    
180    (defun time-to-number-of-days (time)
181      "Return the number of days represented by TIME.
182    The number of days will be returned as a floating point number."
183      (/ (+ (* 1.0 65536 (car time)) (cadr time)) (* 60 60 24)))
184    
185  ;;;###autoload  ;;;###autoload
186  (defun safe-date-to-time (date)  (defun safe-date-to-time (date)
187    "Parse a string that represents a date-time and return a time value.    "Parse a string that represents a date-time and return a time value.

Legend:
Removed from v.1.5.4.3  
changed lines
  Added in v.1.5.4.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26