Tidy: (org-ql--parse-time-string) Remove
Unused now. It served well.
This commit is contained in:
parent
eb38cf6b06
commit
317a460c1d
1 changed files with 0 additions and 19 deletions
19
org-ql.el
19
org-ql.el
|
|
@ -623,25 +623,6 @@ Or, when possible, fix the problem."
|
|||
(org-ql--sanity-check-form (cdr elem)))
|
||||
else do (check elem))))
|
||||
|
||||
(defun org-ql--parse-time-string (s &optional end)
|
||||
"Return Unix timestamp by parsing timestamp string S.
|
||||
Calls `parse-time-string' and fills in nil second, minute, and
|
||||
hour values, then calls `float-time'. When END is non-nil, sets
|
||||
empty time values to 23:59:59; otherwise, to 00:00:00."
|
||||
;; TODO: Also accept Unix timestamps.
|
||||
(cl-macrolet ((fill-with (place value)
|
||||
`(unless (nth ,place parsed-time)
|
||||
(setf (nth ,place parsed-time) ,value))))
|
||||
(let ((parsed-time (parse-time-string s)))
|
||||
(pcase end
|
||||
('nil (fill-with 0 0)
|
||||
(fill-with 1 0)
|
||||
(fill-with 2 0))
|
||||
(_ (fill-with 0 59)
|
||||
(fill-with 1 59)
|
||||
(fill-with 2 23)))
|
||||
(float-time (apply #'encode-time parsed-time)))))
|
||||
|
||||
;;;;; Predicates
|
||||
|
||||
(org-ql--defpred children (query)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue