mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-11-15 02:58:29 +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.
|
;; Document end.
|
||||||
"\\end{document}")))
|
"\\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)
|
(defun org-cv-cventry (headline contents info)
|
||||||
(let ((from-date (org-element-property :FROM headline))
|
(let ((from-date (org-element-property :FROM headline))
|
||||||
(to-date (org-element-property :TO headline))
|
(to-date (org-element-property :TO headline))
|
||||||
(location (org-element-property :LOCATION headline))
|
(location (org-element-property :LOCATION headline))
|
||||||
(title (org-element-property :title headline))
|
(title (org-element-property :title headline))
|
||||||
|
(note (org-element-property :NOTE headline))
|
||||||
(employer (org-element-property :EMPLOYER headline)))
|
(employer (org-element-property :EMPLOYER headline)))
|
||||||
(format "\\cventry{%s}{%s}{%s}{%s}{%s}{%s}\n"
|
(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
|
;;;; Headline
|
||||||
|
|
Loading…
Reference in a new issue