emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/time-date.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/time-date.el
Date: Sun, 10 Apr 2005 00:20:16 -0400

Index: emacs/lisp/calendar/time-date.el
diff -c emacs/lisp/calendar/time-date.el:1.11 
emacs/lisp/calendar/time-date.el:1.12
*** emacs/lisp/calendar/time-date.el:1.11       Mon Apr  4 05:04:44 2005
--- emacs/lisp/calendar/time-date.el    Sun Apr 10 04:20:14 2005
***************
*** 1,5 ****
  ;;; time-date.el --- Date and time handling functions
! ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software 
Foundation, Inc.
  
  ;; Author: Lars Magne Ingebrigtsen <address@hidden>
  ;;    Masanobu Umeda <address@hidden>
--- 1,6 ----
  ;;; time-date.el --- Date and time handling functions
! ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005
! ;;        Free Software Foundation, Inc.
  
  ;; Author: Lars Magne Ingebrigtsen <address@hidden>
  ;;    Masanobu Umeda <address@hidden>
***************
*** 112,126 ****
    "Convert time value TIME to a floating point number.
  You can use `float-time' instead."
    (with-decoded-time-value ((high low micro time))
!     (+ (* 1.0 high #x10000)
         low
         (/ micro 1000000.0))))
  
  ;;;###autoload
  (defun seconds-to-time (seconds)
    "Convert SECONDS (a floating point number) to a time value."
!   (list (floor seconds #x10000)
!       (floor (mod seconds #x10000))
        (floor (* (- seconds (ffloor seconds)) 1000000))))
  
  ;;;###autoload
--- 113,127 ----
    "Convert time value TIME to a floating point number.
  You can use `float-time' instead."
    (with-decoded-time-value ((high low micro time))
!     (+ (* 1.0 high 65536)
         low
         (/ micro 1000000.0))))
  
  ;;;###autoload
  (defun seconds-to-time (seconds)
    "Convert SECONDS (a floating point number) to a time value."
!   (list (floor seconds 65536)
!       (floor (mod seconds 65536))
        (floor (* (- seconds (ffloor seconds)) 1000000))))
  
  ;;;###autoload
***************
*** 138,147 ****
  (defun days-to-time (days)
    "Convert DAYS into a time value."
    (let* ((seconds (* 1.0 days 60 60 24))
!        (high (condition-case nil (floor (/ seconds #x10000))
                 (range-error most-positive-fixnum))))
!     (list high (condition-case nil (floor (- seconds (* 1.0 high #x10000)))
!                (range-error #xffff)))))
  
  ;;;###autoload
  (defun time-since (time)
--- 139,148 ----
  (defun days-to-time (days)
    "Convert DAYS into a time value."
    (let* ((seconds (* 1.0 days 60 60 24))
!        (high (condition-case nil (floor (/ seconds 65536))
                 (range-error most-positive-fixnum))))
!     (list high (condition-case nil (floor (- seconds (* 1.0 high 65536)))
!                (range-error 65535)))))
  
  ;;;###autoload
  (defun time-since (time)
***************
*** 170,176 ****
            micro (+ micro 1000000)))
      (when (< low 0)
        (setq high (1- high)
!           low (+ low #x10000)))
      (encode-time-value high low micro type)))
  
  ;;;###autoload
--- 171,177 ----
            micro (+ micro 1000000)))
      (when (< low 0)
        (setq high (1- high)
!           low (+ low 65536)))
      (encode-time-value high low micro type)))
  
  ;;;###autoload
***************
*** 185,193 ****
      (when (>= micro 1000000)
        (setq low (1+ low)
            micro (- micro 1000000)))
!     (when (>= low #x10000)
        (setq high (1+ high)
!           low (- low #x10000)))
      (encode-time-value high low micro type)))
  
  ;;;###autoload
--- 186,194 ----
      (when (>= micro 1000000)
        (setq low (1+ low)
            micro (- micro 1000000)))
!     (when (>= low 65536)
        (setq high (1+ high)
!           low (- low 65536)))
      (encode-time-value high low micro type)))
  
  ;;;###autoload




reply via email to

[Prev in Thread] Current Thread [Next in Thread]