X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elmo%2Felmo-date.el;h=5e8ad89bb2b6590216e568fc91c2f1082ce66e2e;hb=2e9f5d2e3f003da464c20fe9924d1e80849265e6;hp=5a6216c3a808a54e3531fcff1aea9d52542ae437;hpb=e1cc40b6595cc2bdffc7cae4ad969be327676f8f;p=elisp%2Fwanderlust.git diff --git a/elmo/elmo-date.el b/elmo/elmo-date.el index 5a6216c..5e8ad89 100644 --- a/elmo/elmo-date.el +++ b/elmo/elmo-date.el @@ -49,15 +49,15 @@ (aref datevec 0))) (defun elmo-date-get-datevec (description) - (cond + (cond ((not elmo-date-match) (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)))) @@ -113,7 +113,7 @@ (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)