defgroup for timestring.el

Trying to be more idiomatic.
This commit is contained in:
William Carroll 2020-09-07 19:48:27 +01:00
parent 8022b7a811
commit 62a7478bd2

View file

@ -32,17 +32,22 @@
;; Library ;; Library
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defgroup timestring nil
"Customize group for timestring configuration.")
(defcustom timestring-supported-encodings (defcustom timestring-supported-encodings
'(("RFC 3339" . "%Y-%m-%dT%H:%M:%SZ") '(("RFC 3339" . "%Y-%m-%dT%H:%M:%SZ")
;; Does anyone recognize this format? ;; Does anyone recognize this format?
("IDK" . "%Y-%m-%d %H:%M:%S %z")) ("IDK" . "%Y-%m-%d %H:%M:%S %z"))
"Mapping of encoding names to their format strings.") "Mapping of encoding names to their format strings."
:group 'timestring)
(defcustom timestring-supported-times (defcustom timestring-supported-times
'(("yesterday" . timestring--yesterday) '(("yesterday" . timestring--yesterday)
("now" . ts-now) ("now" . ts-now)
("tomorrow" . timestring--tomorrow)) ("tomorrow" . timestring--tomorrow))
"Mapping of a labels to the functions that create those time objects.") "Mapping of a labels to the functions that create those time objects."
:group 'timestring)
(defun timestring--yesterday () (defun timestring--yesterday ()
"Return a time object for yesterday." "Return a time object for yesterday."