208 |
(cur-date (and exp (timezone-parse-date (current-time-string)))) |
(cur-date (and exp (timezone-parse-date (current-time-string)))) |
209 |
(exp-date (and exp (timezone-parse-date exp))) |
(exp-date (and exp (timezone-parse-date exp))) |
210 |
(cur-greg (and cur-date (timezone-absolute-from-gregorian |
(cur-greg (and cur-date (timezone-absolute-from-gregorian |
211 |
(string-to-int (aref cur-date 1)) |
(string-to-number (aref cur-date 1)) |
212 |
(string-to-int (aref cur-date 2)) |
(string-to-number (aref cur-date 2)) |
213 |
(string-to-int (aref cur-date 0))))) |
(string-to-number (aref cur-date 0))))) |
214 |
(exp-greg (and exp (timezone-absolute-from-gregorian |
(exp-greg (and exp (timezone-absolute-from-gregorian |
215 |
(string-to-int (aref exp-date 1)) |
(string-to-number (aref exp-date 1)) |
216 |
(string-to-int (aref exp-date 2)) |
(string-to-number (aref exp-date 2)) |
217 |
(string-to-int (aref exp-date 0))))) |
(string-to-number (aref exp-date 0))))) |
218 |
(diff-in-days (and exp (- cur-greg exp-greg))) |
(diff-in-days (and exp (- cur-greg exp-greg))) |
219 |
) |
) |
220 |
(cond |
(cond |
224 |
(t ; Expires sometime today, check times |
(t ; Expires sometime today, check times |
225 |
(let* ((cur-time (timezone-parse-time (aref cur-date 3))) |
(let* ((cur-time (timezone-parse-time (aref cur-date 3))) |
226 |
(exp-time (timezone-parse-time (aref exp-date 3))) |
(exp-time (timezone-parse-time (aref exp-date 3))) |
227 |
(cur-norm (+ (* 360 (string-to-int (aref cur-time 2))) |
(cur-norm (+ (* 360 (string-to-number (aref cur-time 2))) |
228 |
(* 60 (string-to-int (aref cur-time 1))) |
(* 60 (string-to-number (aref cur-time 1))) |
229 |
(* 1 (string-to-int (aref cur-time 0))))) |
(* 1 (string-to-number (aref cur-time 0))))) |
230 |
(exp-norm (+ (* 360 (string-to-int (aref exp-time 2))) |
(exp-norm (+ (* 360 (string-to-number (aref exp-time 2))) |
231 |
(* 60 (string-to-int (aref exp-time 1))) |
(* 60 (string-to-number (aref exp-time 1))) |
232 |
(* 1 (string-to-int (aref exp-time 0)))))) |
(* 1 (string-to-number (aref exp-time 0)))))) |
233 |
(> (- cur-norm exp-norm) 1)))))) |
(> (- cur-norm exp-norm) 1)))))) |
234 |
|
|
235 |
;;;###autoload |
;;;###autoload |