emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb ce5d9ee 242/350: Fix vCard formatting for annivers


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb ce5d9ee 242/350: Fix vCard formatting for anniversaries
Date: Mon, 14 Aug 2017 11:46:46 -0400 (EDT)

branch: externals/ebdb
commit ce5d9ee855acbec7c326d09ad243ce399fb0f3a7
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Fix vCard formatting for anniversaries
    
    * ebdb-vcard.el (ebdb-fmt-field): There will be more cases to handle
      than just this, but this ought to do it for now.
---
 ebdb-vcard.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ebdb-vcard.el b/ebdb-vcard.el
index 1019a2e..29e37ab 100644
--- a/ebdb-vcard.el
+++ b/ebdb-vcard.el
@@ -342,5 +342,14 @@ method is just responsible for formatting the record name."
     (concat label-string (format ";CALSCALE=%s"
                                 (slot-value ann 'calendar)))))
 
+(cl-defmethod ebdb-fmt-field ((_f ebdb-formatter-vcard)
+                             (ann ebdb-field-anniversary)
+                             _style
+                             _record)
+  (pcase-let ((`(,month ,day ,year)
+              (calendar-gregorian-from-absolute
+               (slot-value ann 'date))))
+    (format "%d%02d%02d" year month day)))
+
 (provide 'ebdb-vcard)
 ;;; ebdb-vcard.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]