19 lines
649 B
EmacsLisp
19 lines
649 B
EmacsLisp
;; -*- lexical-binding: t; -*-
|
|
(defun unix-time-to-string (epoch-seconds &optional format-string)
|
|
"Converts an epoch timestamp into a human-readable string."
|
|
(interactive "nUnix timestamp: ")
|
|
(let* ((format-string (or format-string "%FT%T%z"))
|
|
(formatted (format-time-string format-string epoch-seconds)))
|
|
(if (called-interactively-p)
|
|
(message formatted)
|
|
formatted)))
|
|
|
|
(use-package casual-calc
|
|
:straight (:type git :host github :repo "kickingvegas/casual-calc")
|
|
:commands casual-calc-tmenu
|
|
:general
|
|
(calc-mode-map "C-o" #'casual-calc-tmenu)
|
|
(calc-alg-map "C-o" #'casual-calc-tmenu))
|
|
|
|
(provide 'init-utils)
|