mirror of
https://github.com/protesilaos/denote.git
synced 2026-09-10 07:16:20 -04:00
Reindent denote-valid-date-p
This commit is contained in:
parent
1aedcff2d7
commit
3f5ede71d4
19
denote.el
19
denote.el
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue