/[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.7 by lektu, Tue Apr 20 16:38:08 2004 UTC revision 1.7.2.1 by rsteib, Mon Aug 16 09:59:46 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 176  The Gregorian date Sunday, December 31, Line 176  The Gregorian date Sunday, December 31,
176         (- (/ (1- year) 100))            ;       - century years         (- (/ (1- year) 100))            ;       - century years
177         (/ (1- year) 400))))             ;       + Gregorian leap years         (/ (1- year) 400))))             ;       + Gregorian leap years
178    
179    (defun time-to-number-of-days (time)
180      "Return the number of days represented by TIME.
181    The number of days will be returned as a floating point number."
182      (/ (+ (* 1.0 65536 (car time)) (cadr time)) (* 60 60 24)))
183    
184  ;;;###autoload  ;;;###autoload
185  (defun safe-date-to-time (date)  (defun safe-date-to-time (date)
186    "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.7  
changed lines
  Added in v.1.7.2.1

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