From: Andreas Fuchs <asf@void.at>
Subject: Re: ISO date in attribution line
Date: Sun, 09 Jun 2002 22:40:49 +0200 [thread overview]
Message-ID: <E17H9UX-0006YC-00@eris.void.at> (raw)
In-Reply-To: <vafk7p8nsv7.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de>
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
Today, Kai Großjohann <Kai.Grossjohann@cs.uni-dortmund.de> 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@acm.org>, asf@jabber.at, antifuchs
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next prev parent reply other threads:[~2002-06-09 20:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-24 15:59 The followup will show the bug Kai Großjohann
2002-05-24 21:45 ` Reiner Steib
2002-05-25 17:22 ` Kai Großjohann
2002-05-25 17:49 ` Oystein Viggen
2002-05-27 13:47 ` Christopher Splinter
2002-05-27 14:40 ` Kai Großjohann
2002-05-27 15:32 ` Oystein Viggen
2002-05-27 19:07 ` Paul Jarc
2002-05-28 11:06 ` Christopher Splinter
2002-05-28 6:30 ` Niklas Morberg
2002-05-28 7:30 ` he " Marco Lonsing
2002-05-28 7:38 ` The " David Kågedal
2002-05-28 7:38 ` David Kågedal
[not found] ` <u5tptzg90xj.fsf@leeloo.hq.vtech>
2002-05-28 8:12 ` Ronan Waide
2002-05-28 22:24 ` Alex Schroeder
2002-05-28 9:21 ` Kai Großjohann
2002-05-29 9:33 ` Niklas Morberg
2002-05-28 11:03 ` Christopher Splinter
2002-05-27 17:59 ` Jesper Harder
2002-05-28 13:01 ` Kai Großjohann
2002-05-28 13:31 ` Kai Großjohann
2002-05-28 13:31 ` Kai Großjohann
2002-05-28 16:36 ` Jesper Harder
2002-05-29 7:38 ` Kai Großjohann
2002-05-29 18:26 ` Johann Gambolputty de von ausfern schplenden schlitter...von Hautkopft of Ulm
2002-05-29 20:11 ` Jesper Harder
2002-05-30 9:57 ` Kai Großjohann
2002-05-30 10:01 ` Kai Großjohann
2002-05-30 9:56 ` Kai Großjohann
2002-05-28 17:36 ` Christopher Splinter
2002-05-25 20:28 ` Andreas Fuchs
2002-06-09 18:04 ` ISO date in attribution line (Was: Re: The followup will show the bug.) Svend Tollak Munkejord
2002-06-09 18:35 ` ISO date in attribution line Andreas Fuchs
2002-06-09 19:40 ` Kai Großjohann
2002-06-09 20:22 ` lawrence mitchell
2002-06-10 9:36 ` Kai Großjohann
2002-06-10 17:16 ` Andreas Fuchs
2002-06-11 10:51 ` Kai Großjohann
2002-06-09 20:40 ` Andreas Fuchs [this message]
2002-06-09 20:59 ` Svend Tollak Munkejord
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E17H9UX-0006YC-00@eris.void.at \
--to=asf@void.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).