[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 3 Aug 2006 15:43:47 +0900
Although I'm not sure how soon rfc822-date->date in the rfc822 egg is
going to be implemented,
I made a similar procedure, which I found useful.
This would be chicken-specific, but does not requre SRFI-19.
How do you like it?
P.S. Can anybody explain why it does "abs" for rem?
(define (rfc822date->seconds string)
(receive (year month day hour min sec tz . rest)
(vector sec min hour day (- month 1) (- year 1900) 0 0 #f 0))
(let ([quot (quotient tz 100)]
[rem (remainder tz 100)])
(+ (* quot 3600) (* (abs rem) 60)))))))
- [Chicken-users] rfc822,
Daishi Kato <=