WIP: Parse string into ts
Rather than using a Unix timestamp, which makes a different ts depending on the system timezone, due to an issue in ts.el (which I hope to fix soon).
This commit is contained in:
parent
5924b37cb7
commit
3d6747f427
1 changed files with 5 additions and 19 deletions
|
|
@ -41,25 +41,11 @@
|
||||||
|
|
||||||
;;;; Functions
|
;;;; Functions
|
||||||
|
|
||||||
(let ((print-level nil)
|
|
||||||
(print-length nil))
|
|
||||||
(ert-deftest org-ql--normalize-query ()
|
(ert-deftest org-ql--normalize-query ()
|
||||||
(should (equal (org-ql--normalize-query '(or (ts-active :on "2019-01-01")
|
(should (equal (org-ql--normalize-query '(ts-active :on "2019-01-01"))
|
||||||
(ts-a :on "2019-01-01")
|
`(ts :type active
|
||||||
(ts-inactive :on "2019-01-01")
|
:from ,(ts-apply :hour 0 :minute 0 :second 0 (ts-parse "2019-01-01"))
|
||||||
(ts-i :on "2019-01-01")))
|
:to ,(ts-apply :hour 23 :minute 59 :second 59 (ts-parse "2019-01-01"))))))
|
||||||
`(or (ts :type active
|
|
||||||
:from ,(make-ts :unix 1546322400.0)
|
|
||||||
:to ,(make-ts :unix 1546408799.0))
|
|
||||||
(ts :type active
|
|
||||||
:from ,(make-ts :unix 1546322400.0)
|
|
||||||
:to ,(make-ts :unix 1546408799.0))
|
|
||||||
(ts :type inactive
|
|
||||||
:from ,(make-ts :unix 1546322400.0)
|
|
||||||
:to ,(make-ts :unix 1546408799.0))
|
|
||||||
(ts :type inactive
|
|
||||||
:from ,(make-ts :unix 1546322400.0)
|
|
||||||
:to ,(make-ts :unix 1546408799.0)))))))
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Footer
|
;;;; Footer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue