From 317a460c1df4281528140eaf267527d92384a0be Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 13 Aug 2019 21:29:05 -0500 Subject: [PATCH] Tidy: (org-ql--parse-time-string) Remove Unused now. It served well. --- org-ql.el | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/org-ql.el b/org-ql.el index 57e31ba..9c5cfc7 100644 --- a/org-ql.el +++ b/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)