From: teranisi Date: Mon, 15 Jan 2001 01:22:11 +0000 (+0000) Subject: * poe-18.el (floor): Removed. X-Git-Tag: apel-10_3-1~28 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4df3585adcf5178bff7ea22c63a5a2933442828;p=elisp%2Fapel.git * poe-18.el (floor): Removed. * timezone.el (timezone-floor): New function. (timezone-fix-time-2): Use `timezone-floor' instead of `floor'. --- diff --git a/ChangeLog b/ChangeLog index 72ca278..caab817 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-01-15 Yuuichi Teranishi + + * poe-18.el (floor): Removed. + + * timezone.el (timezone-floor): New function. + (timezone-fix-time-2): Use `timezone-floor' instead of `floor'. + 2000-12-31 NAKAJIMA Mikio * README.ja: Typo fixed. diff --git a/poe-18.el b/poe-18.el index 9d2f2ea..033312f 100644 --- a/poe-18.el +++ b/poe-18.el @@ -454,15 +454,6 @@ resolution finer than a second." "Return the absolute value of ARG." (if (< arg 0) (- arg) arg)) -(defun floor (arg &optional divisor) - "Return the largest integer no grater than ARG. -With optional DIVISOR, return the largest integer no greater than ARG/DIVISOR." - (if (null divisor) - (setq divisor 1)) - (if (< arg 0) - (- (/ (- divisor 1 arg) divisor)) - (/ arg divisor))) - ;;; @ Basic lisp subroutines. ;;; diff --git a/timezone.el b/timezone.el index 8db1d85..33f0231 100644 --- a/timezone.el +++ b/timezone.el @@ -278,6 +278,15 @@ or an integer of the form +-HHMM, or a time zone name." (if (< timezone 0) (- minutes) minutes)))) (t 0))) +(defun timezone-floor (arg &optional divisor) + "Return the largest integer no grater than ARG. +With optional DIVISOR, return the largest integer no greater than ARG/DIVISOR." + (if (null divisor) + (setq divisor 1)) + (if (< arg 0) + (- (/ (- divisor 1 arg) divisor)) + (/ arg divisor))) + (defun timezone-time-from-absolute (date seconds) "Compute the UTC time equivalent to DATE at time SECONDS after midnight. Return a list suitable as an argument to `current-time-zone', @@ -296,9 +305,9 @@ Gregorian date Sunday, December 31, 1 BC." (seconds-per-day-3 128) ;; (seconds (+ seconds (* days seconds-per-day))) ;; (current-time-arithmetic-base (float 65536)) - ;; (hi (floor (/ seconds current-time-arithmetic-base))) + ;; (hi (timezone-floor (/ seconds current-time-arithmetic-base))) ;; (hibase (* hi current-time-arithmetic-base)) - ;; (lo (floor (- seconds hibase))) + ;; (lo (timezone-floor (- seconds hibase))) (seconds-1 (/ seconds 65536)) (seconds-2 (% (/ seconds 256) 256)) (seconds-3 (% seconds 256)) @@ -409,7 +418,7 @@ If TIMEZONE is nil, use the local time zone." (diff (- (timezone-zone-to-minute timezone) (timezone-zone-to-minute local))) (minute (+ minute diff)) - (hour-fix (floor minute 60))) + (hour-fix (timezone-floor minute 60))) (setq hour (+ hour hour-fix)) (setq minute (- minute (* 60 hour-fix))) ;; HOUR may be larger than 24 or smaller than 0.