Article View: news.software.readers
Article #49894[slrn] Patch: Formatted output of dates
From: Thomas Schultz
Date: Fri, 16 Jul 1999 00:00
Date: Fri, 16 Jul 1999 00:00
37 lines
2322 bytes
2322 bytes
Hi,
I just wrote a patch that makes it possible to have a formatted output
of dates in "header_display_format" and "followup_string" (the
original, unconfigureable patch is due to Gottfried Schwieters
<Gottfried.Schwieters@gmx.de>). It introduces a new descriptor, '%D',
which will print the date as determined by the following variables:
- "overview_date_format" (syntax of strftime(3)) is the format string
used for "header_display_format"; defaults to "%d %b %y %H:%M".
- "followup_date_format" (syntax of strftime(3)) is the format string
used for "followup_string"; defaults to "%a, %d %b %Y at %H:%M GMT".
- If "use_localtime" is nonzero, the date will be converted to the
user's local timezone. If it is zero (default), it will be in GMT.
- "date_locale" can be set to a "locale" (see setlocale(3)) which
will be used when formatting the date (e.g. I would set it to
"de_DE" to get the german names for days and months when posting to
de.*). Defaults to "C" (standard English).
The original reason for writing this patch was that it is confusing
(and taking up much space) to have all these different date formats
and time zones on your screen. Having written a patch for this, I
thought it would be nice to have the date in the same language as the
rest of "followup_string", so I added "followup_date_format" and
"date_locale".
I found the patch a little too long to post it to the newsgroup (~200
lines), but will gladly send it to anybody who is interested in it via
e-mail.
--
Kind regards,
Thomas Schultz
Technical Details
Message-ID:
<slrn7ot36q.ajh.tststs@starflower.tststs.ddns.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <slrn7ot36q.ajh.tststs@starflower.tststs.ddns.org> Subject: [slrn] Patch: Formatted output of dates Date: Fri, 16 Jul 1999 00:00:00 +0000 From: tststs@gmx.de (Thomas Schultz) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 501556332 X-Server-Date: 16 Jul 1999 01:36:11 GMT X-Trace: news2.cityweb.de 932089164 62.52.148.89 (Fri, 16 Jul 1999 03:39:24 MET DST) Organization: Pinguin online User-Agent: slrn/0.9.5.7 (UNIX) NNTP-Posting-Date: Fri, 16 Jul 1999 03:39:24 MET DST Newsgroups: news.software.readers