mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 19:31:02 -08:00
Add FIXMEs for subsecond support
This adds FIXMEs to areas where Lisp code should support subsecond information in broken-down timestamps. It also fixes some unnecessary truncation of timestamps, and ports the code to a hypothetical future Emacs version where (decode-time) returns subsecond timestamps by default. * lisp/calc/calc-forms.el (calc-time, math-iso-dt-to-date) (calcFunc-now): * lisp/calendar/icalendar.el (icalendar--add-decoded-times): * lisp/calendar/iso8601.el (iso8601-parse-interval): Truncate seconds to an integer, and add a FIXME about subseconds support. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime) (icalendar--decode-isoduration): Add a FIXME about subseconds support. * lisp/gnus/gnus-delay.el (gnus-delay-article): Don’t truncate seconds to an integer, as there’s no need to do that here. * lisp/gnus/gnus-util.el (gnus-seconds-today) (gnus-seconds-month, gnus-seconds-year): * lisp/gnus/message.el (message-make-expires-date): * lisp/org/org-timer.el (org-timer-show-remaining-time): * lisp/vc/ediff-mult.el (ediff-format-date): Truncate seconds to an integer, as that’s what’s wanted here. * lisp/midnight.el (midnight-next): Ceiling seconds to an integer, as that’s what wanted here.
This commit is contained in:
parent
6616806896
commit
c90a420779
9 changed files with 28 additions and 18 deletions
|
|
@ -37,7 +37,7 @@
|
|||
(defun calc-time ()
|
||||
(interactive)
|
||||
(calc-wrapper
|
||||
(let ((time (decode-time)))
|
||||
(let ((time (decode-time nil nil 'integer))) ;; FIXME: Support subseconds.
|
||||
(calc-enter-result 0 "time"
|
||||
(list 'mod
|
||||
(list 'hms
|
||||
|
|
@ -499,7 +499,8 @@ in the Gregorian calendar and the remaining part determines the time."
|
|||
(math-add (math-float date)
|
||||
(math-div (math-add (+ (* (nth 3 dt) 3600)
|
||||
(* (nth 4 dt) 60))
|
||||
(nth 5 dt))
|
||||
;; FIXME: Support subseconds.
|
||||
(time-convert (nth 5 dt) 'integer))
|
||||
'(float 864 2)))
|
||||
date)))
|
||||
|
||||
|
|
@ -1327,7 +1328,8 @@ as measured in the integer number of days before December 31, 1 BC (Gregorian)."
|
|||
(math-parse-iso-date-validate isoyear isoweek isoweekday hour minute second)))))
|
||||
|
||||
(defun calcFunc-now (&optional zone)
|
||||
(let ((date (let ((now (decode-time)))
|
||||
;; FIXME: Support subseconds.
|
||||
(let ((date (let ((now (decode-time nil nil 'integer)))
|
||||
(list 'date (math-dt-to-date
|
||||
(list (decoded-time-year now)
|
||||
(decoded-time-month now)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue