[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 9c79aedec7 2/3: org-agenda: Use more machin
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 9c79aedec7 2/3: org-agenda: Use more machine-friendly date output for csv export |
Date: |
Mon, 26 Dec 2022 04:58:02 -0500 (EST) |
branch: externals-release/org
commit 9c79aedec74d6a7da65d20f5356f54fd2fc32770
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-agenda: Use more machine-friendly date output for csv export
* lisp/org-agenda.el (org-fix-agenda-info): Pad the month and date
numbers with 0, making sure that the date format is always YYYY-MM-DD.
Reported-by: David O'Toole <deeteeoh1138@gmail.com>
Link:
https://orgmode.org/list/CAAz1J52e7ha=rtyz=Kn=o-X48XU3oNJYF57xo5hOBnz8_Twdyg@mail.gmail.com
---
lisp/org-agenda.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eda2489384..d31391d11d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3477,14 +3477,14 @@ This ensures the export commands can easily use it."
(setq props (plist-put props 'tags (mapconcat #'identity tmp ":"))))
(when (setq tmp (plist-get props 'date))
(when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp)))
- (let ((calendar-date-display-form '(year "-" month "-" day)))
- '((format "%4d, %9s %2s, %4s" dayname monthname day year))
-
+ (let ((calendar-date-display-form
+ '(year "-" (string-pad month 2 ?0 'left) "-" (string-pad day 2 ?0
'left))))
(setq tmp (calendar-date-string tmp)))
(setq props (plist-put props 'date tmp)))
(when (setq tmp (plist-get props 'day))
(when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp)))
- (let ((calendar-date-display-form '(year "-" month "-" day)))
+ (let ((calendar-date-display-form
+ '(year "-" (string-pad month 2 ?0 'left) "-" (string-pad day 2 ?0
'left))))
(setq tmp (calendar-date-string tmp)))
(setq props (plist-put props 'day tmp))
(setq props (plist-put props 'agenda-day tmp)))