1
0
Fork 0

update solution: emacs-lisp, gigasecond.

main
Gökmen Görgen 2 months ago
parent 50e83fdeef
commit 02ada56b04
  1. 3
      emacs-lisp/gigasecond/gigasecond.el

@ -11,7 +11,8 @@
(defun from (&rest datetime)
"Given a moment, determine the moment that would be after a gigasecond has passed."
(butlast (decode-time (time-add (apply 'encode-time (append datetime (list "UTC"))) (expt 10 9)) "UTC") 3))
(let ((encoded-time (apply 'encode-time (append datetime (list "UTC")))))
(butlast (decode-time (time-add encoded-time (expt 10 9)) "UTC") 3)))
(provide 'gigasecond)
;;; gigasecond.el ends here

Loading…
Cancel
Save