Add DATEFORMAT option to letterheader

Allows adjustment of the dateformat string used for the coverletter header
This commit is contained in:
Roger Welsh 2021-03-20 21:04:02 +13:00
parent e372aa78be
commit 99ea2e0878

View file

@ -247,10 +247,11 @@ as a communication channel."
(label-str (if label (format "%s\\hfill{}" label) "")) (label-str (if label (format "%s\\hfill{}" label) ""))
;; Other Coverletter properties ;; Other Coverletter properties
(recipient (or (org-element-property :RECIPIENT headline) "")) (recipient (or (org-element-property :RECIPIENT headline) ""))
(letter-dateformat (org-element-property :DATEFORMAT headline))
(letter-date (letter-date
(format "\\letterdate{%s}" (format "\\letterdate{%s}"
(if date (if date
(format "%s" (org-awesomecv-org-timestamp-to-dateformat date nil t)) (format "%s" (org-awesomecv-org-timestamp-to-dateformat date letter-dateformat t))
"\\today"))) "\\today")))
(letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) "")) (letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) ""))
(letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) "")) (letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) ""))