1
0
Fork 0

update solution: emacs-lisp, gigasecond.

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

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

Loading…
Cancel
Save