Today, Kai Großjohann wrote: > I get the feeling that doing format-time-string on the result of > parse-time-string would be enough. Anyone want to try this? > (defun sc-jk-normalize-date (date) > "..." > (let ((date (encode-time (parse-time-string date)))) > (format-time-string "..." date))) This would have to be written as "(apply 'encode-time (parse...", and then it will fail (integerp nil) because of tc's slightly braindead date format: "Sun, 9 Jun 2002". That's it, all seconds, minutes, etc removed From the time string. Don't know why. A slightly more readable version is this (but I guess the right thing is to fix tc's date behaviour, which will be hard because I've seen modules depend on it): ,---- | (defun sc-jk-normalize-date (date) | "Extract the date (day month year) from an RFC 822 message | and write it as year-month-day (ISO 8601)" | (let* ((date-list (cdr (cdr (cdr (parse-time-string date))))) | (day (pop date-list)) | (month (pop date-list)) | (year (car date-list))) | (and year month day | (format "%d-%02d-%02d" year month day)))) `---- Have fun, -- Andreas Fuchs, , asf@jabber.at, antifuchs