Article View: news.software.readers
Article #143095Re: Dialog - Date String
From: MLC
Date: Sun, 08 Feb 2004 08:38
Date: Sun, 08 Feb 2004 08:38
72 lines
3321 bytes
3321 bytes
domenica 08/feb/2004 _CyberDroog_ ha scritto:
> Does anyone know how to add leading zeros to the date string in the headers
> list? There are a couple of date alteration scripts on the Dialog Wiki,
> but neither one works. Since I'm not familiar with Pascal, I don't know
> how to get started.
>
> Thanks for any suggestions.
Hi,
I saw only last night that in Wiki there is a Gandalf's variation of a
script of mines and I think me too that that version doesn't work very well.
If you want, try my original version and let us know.
This version takes into account the different date settings (long or short):
(read the comments inside)
program OnArticleListPaint;
const
colDate=5; // in the headers panel count the columns from left
// to right starting from 0 and write here the
// number of the coulumn Date
function
OnArticleListPaint(PaintString:WideString;ColumnIndex:Integer):WideString;
var
n: Integer;
tmpString: WideString;
begin
case ColumnIndex of
colDate:
begin
tmpString := PaintString;
n:=length(PaintString);
if ((n=16) or (n=17)) then // two digits year
begin
PaintString := Copy(PaintString, 1, 9);
case n of
16:
PaintString := PaintString + ' ' + Copy(tmpString, 10, 4);
17:
PaintString := PaintString + ' ' + Copy(tmpString, 10, 5);
end;
end
else // four digits year
begin
PaintString := Copy(PaintString, 1, 6) + Copy(PaintString, 9, 3);
case n of
19:
PaintString := PaintString + Copy(tmpString, 12, 5);
18:
PaintString := PaintString + ' ' + Copy(tmpString, 12, 4);
//if you want hours from 0 to 9 starting with 0, in the above line
//put a 0 inside ' ' instead of a space
end; //case
end; //if
end; //case
end;
result:=PaintString;
end;
begin
end.
--
Maria Luisa C - 08/02/04 9.23.10, here.
7/9 di tutorial su Dialog:
http://fido.altervista.org/Dialog/dialog.php
Technical Details
Message-ID:
<1b3w123lpyuyp$.dlg@ID-187316.user.uni-berlin.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!ppp-203-199.26-151.libero.IT!not-for-mailReferences:
<1261byxeudi8t.3yagcawaom1k$.dlg@40tude.net>Show Full Headers
Complete Article Headers
Message-ID: <1b3w123lpyuyp$.dlg@ID-187316.user.uni-berlin.de>
Subject: Re: Dialog - Date String
Date: Sun, 8 Feb 2004 09:38:52 +0100
From: MLC <maluc52@yahoo.it>
References: <1261byxeudi8t.3yagcawaom1k$.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!ppp-203-199.26-151.libero.IT!not-for-mail
Newsgroups: news.software.readers
Organization: none
Lines: 72
Reply-To: mlcald@msn.com
NNTP-Posting-Host: ppp-203-199.26-151.libero.it (151.26.199.203)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 1076229536 36369386 D 151.26.199.203 ([187316])
User-Agent: 40tude_Dialog/2.0.10.1it (78e69761.235.315)
X-Face: (O6iue.kQNT|`uU@vD|.WKC^TF~T<TIA,\;
B'27kz>*1Mk|Z6U!2EKSFc')'xVk]t'/3<,#
#L+5&I{L<!Q%p[k|+%mSCT"e2\4JnDJhbQ,`EA4fu$q0q>{7W?\gQeqD@*lzcR0~:9Zzn!1yCRb