Hi Bala, Bala Ramadurai <nikimonik...@gmail.com> writes:
> I am working on a org-capture-template and one of the entries is a date (30 > days later) I want in European format. > > My solution is this: > | *Due Date*: %(concat (substring (org-read-date nil nil "+30d") 8 10) "-" > (substring(org-read-date nil nil "+30d") 5 7) "-" (substring(org-read-date > nil nil "+30d") 0 4)) | > > Although this does the job, it is extremely inelegant and only reflects my > poor knowledge in elisp. > > Can any of you please help me in making this code better? Does the job is the important part :) One thing you could do that'd make it a little nicer to my eyes is let-binding (org-read-date nil nil "+30d") result to avoid calling it three times. Here's another approach: (format-time-string "%d-%m-%Y" (time-add (days-to-time 30) nil))