Require "backquote" before dealing with the custom issue.
[elisp/wanderlust.git] / elmo / elmo-date.el
index 5a6216c..52e4c66 100644 (file)
@@ -1,6 +1,6 @@
 ;;; elmo-date.el -- Date processing module for ELMO.
 
-;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
+;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
 
 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
 ;; Keywords: mail, net news
          (aref datevec 0)))
 
 (defun elmo-date-get-datevec (description)
-  (cond 
+  (cond
    ((not elmo-date-match)
-    (error "date match is not available"))
+    (error "Date match is not available"))
    ((string-match "^[ \t]*\\([0-9]+\\)?[ \t]*\\([a-zA-Z]+\\)$" description)
-    (let ((today 
+    (let ((today
           (save-match-data
             (timezone-fix-time (current-time-string) (current-time-zone)
                                nil)))
-         (number 
+         (number
           (string-to-int
            (if (match-beginning 1)
                (elmo-match-string 1 description)
@@ -70,7 +70,7 @@
            (elmo-date-get-offset-datevec today number)
          (error "%s is not supported yet" suffix)))))
    ((string-match "[0-9]+-[A-Za-z]+-[0-9]+" description)
-    (timezone-fix-time 
+    (timezone-fix-time
      (concat (elmo-replace-in-string description "-" " ") " 0:00")
      nil nil))))
 
        (minute   (aref datevec 4))
        (second   (aref datevec 5))
        (timezone (aref datevec 6))
-       day-number p 
+       day-number p
        day-of-month)
     (setq p 1)
     (setq day-number (- (timezone-day-number month day year)
               "0:00")
             (cadr timezone)) nil nil)))
 
-(provide 'elmo-date)
+(defmacro elmo-date-make-sortable-string (datevec)
+  "Make a sortable string from DATEVEC."
+  (` (timezone-make-sortable-date
+      (aref (, datevec) 0)
+      (aref (, datevec) 1)
+      (aref (, datevec) 2)
+      (aref (, datevec) 3))))
+
+(require 'product)
+(product-provide (provide 'elmo-date) (require 'elmo-version))
 
 ;;; elmo-date.el ends here