From: yoichi Date: Thu, 4 Apr 2002 15:14:48 +0000 (+0000) Subject: 2002-04-04 Mito X-Git-Tag: elmo-mark-root~217 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8d56bd754fd5060c731102293a32db2ddd2508ab;p=elisp%2Fwanderlust.git 2002-04-04 Mito * elmo-util.el (elmo-condition-parse-search-value): Accept YYYY-MM-DD format to search. * elmo-date.el (elmo-date-get-datevec): Likewise. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f46d1e3..b516f72 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2002-04-04 Mito + + * elmo-util.el (elmo-condition-parse-search-value): Accept + YYYY-MM-DD format to search. + * elmo-date.el (elmo-date-get-datevec): Likewise. + 2002-04-04 Kenichi OKADA * elmo-nntp.el (elmo-nntp-list-folders-get-cache): Delete diff --git a/elmo/elmo-date.el b/elmo/elmo-date.el index 8bd1b3b..ea2f0e5 100644 --- a/elmo/elmo-date.el +++ b/elmo/elmo-date.el @@ -129,7 +129,13 @@ Otherwise treat \\ in NEWTEXT string as special: ((string-match "[0-9]+-[A-Za-z]+-[0-9]+" description) (timezone-fix-time (concat (elmo-replace-in-string description "-" " ") " 0:0") - (current-time-zone) nil)))) + (current-time-zone) nil)) + ((string-match "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)" description) + (vector (string-to-number (match-string 1 description)) + (string-to-number (match-string 2 description)) + (string-to-number (match-string 3 description)) + 0 0 0 + (current-time-zone))))) (defun elmo-datevec-substitute (datevec1 datevec2) (if (/= (aref datevec2 2) 0) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 6c573b4..b404691 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -254,6 +254,7 @@ Return value is a cons cell of (STRUCTURE . REST)" ;; time ::= "yesterday" / "lastweek" / "lastmonth" / "lastyear" / ;; number SPACE* "daysago" / ;; number "-" month "-" number ; ex. 10-May-2000 +;; number "-" number "-" number ; ex. 2000-05-10 ;; number ::= [0-9]+ ;; month ::= "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / ;; "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" @@ -270,6 +271,7 @@ Return value is a cons cell of (STRUCTURE . REST)" (looking-at "lastmonth") (looking-at "lastyear") (looking-at "[0-9]+ *daysago") (looking-at "[0-9]+-[A-Za-z]+-[0-9]+") + (looking-at "[0-9]+-[0-9]+-[0-9]+") (looking-at "[0-9]+") (looking-at elmo-condition-atom-regexp)) (prog1 (elmo-match-buffer 0)