Reindent denote-valid-date-p

This commit is contained in:
Protesilaos 2026-05-12 13:26:37 +03:00
parent 1aedcff2d7
commit 3f5ede71d4
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -3154,15 +3154,16 @@ A valid DATE is a value that can be parsed by either
if DATE is a value they do not recognise.
If DATE is nil or an empty string, return nil."
(cond ((null date)
nil)
((and (stringp date) (string-empty-p date))
nil)
((and (or (numberp date) (listp date))
(decode-time date))
date)
(t ; non-empty strings (e.g. "2024-01-01", "2024-01-01 12:00", etc.)
(date-to-time (denote--date-add-current-time date)))))
(cond
((null date)
nil)
((and (stringp date) (string-empty-p date))
nil)
((and (or (numberp date) (listp date))
(decode-time date))
date)
(t ; non-empty strings (e.g. "2024-01-01", "2024-01-01 12:00", etc.)
(date-to-time (denote--date-add-current-time date)))))
(define-obsolete-function-alias
'denote--id-to-date