mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-12-22 20:49:04 +00:00
handle dates
This commit is contained in:
parent
b7a9c500d5
commit
ca364bca8a
1 changed files with 16 additions and 1 deletions
17
ox-cv.el
17
ox-cv.el
|
@ -141,14 +141,29 @@ holding export options."
|
|||
;; Document end.
|
||||
"\\end{document}")))
|
||||
|
||||
|
||||
(defun org-cv-timestamp-to-shortdate (date_str)
|
||||
"e.g. <2002-08-12 Mon> => Aug 2012"
|
||||
(let* ((abbreviate 't)
|
||||
(dte (org-parse-time-string date_str))
|
||||
(month (nth 4 dte))
|
||||
(year (nth 5 dte)));;'(02 07 2015)))
|
||||
(concat (calendar-month-name month abbreviate)
|
||||
" "
|
||||
(number-to-string year))))
|
||||
|
||||
(defun org-cv-cventry (headline contents info)
|
||||
(let ((from-date (org-element-property :FROM headline))
|
||||
(to-date (org-element-property :TO headline))
|
||||
(location (org-element-property :LOCATION headline))
|
||||
(title (org-element-property :title headline))
|
||||
(note (org-element-property :NOTE headline))
|
||||
(employer (org-element-property :EMPLOYER headline)))
|
||||
(format "\\cventry{%s}{%s}{%s}{%s}{%s}{%s}\n"
|
||||
"start" title employer location "de paso" contents)))
|
||||
(concat (org-cv-timestamp-to-shortdate from-date)
|
||||
" -- "
|
||||
(org-cv-timestamp-to-shortdate to-date))
|
||||
title employer location note contents)))
|
||||
|
||||
|
||||
;;;; Headline
|
||||
|
|
Loading…
Reference in a new issue