diff options
-rw-r--r-- | tekuti.el | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -39,26 +39,24 @@ ;;; Code: +(defun tekuti--format-date (date) + "Format DATE into a date that tekuti understands." + (format-time-string "%a, %d %b %Y %H:%M:%S %Z" + (org-timestamp-to-time + (org-timestamp-from-string date)) + t)) + (defun tekuti-build-data-from-org () (append (mapcar (lambda (pair) (pcase pair (`("DATE" ,date) - (list "DATE" - (format-time-string - "%a, %d %b %Y %H:%M:%S %Z" - (org-timestamp-to-time - (org-timestamp-from-string date)) - t))) + (list "DATE" (tekuti--format-date date))) (`("COMMENTS_DATE" ,date) (list "COMMENTS-CLOSED-DATE" (and (not (string-empty-p date)) - (format-time-string - "%a, %d %b %Y %H:%M:%S %Z" - (org-timestamp-to-time - (org-timestamp-from-string date)) - t)))) + (tekuti--format-date date)))) (_ pair))) (org-collect-keywords '("TITLE" "TAGS" "STATUS" "COMMENTS" "DATE" "COMMENTS_DATE"))) (list |