🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #141542

Re: [Dialog]

#141542
From: MLC
Date: Sun, 18 Jan 2004 19:10
76 lines
3561 bytes
domenica 18/gen/2004 _Frank Lekens_ ha scritto:

> Op Sun, 18 Jan 2004 16:58:19 GMT schreef foxidrive:
> 
>> You could change your system date format to dd-mm-yyyy which will allow the
>> script to work, or maybe even to dd-mm-yy which dialog should also then
>> use.
> 
> Hm... Windows doesn't offer me the option of dd-mm-yyyy, only dd-mm-yy.
> I'll just use that.

I rearranged that script inside a larger script of mines.
Now I've cut for you the piece you're interested.
It works on both the date format yy and yyyy, and also cut off the seconds.
Please read careful the comments inside the script.

program OnArticleListPaint;
const
                
 colDate=5; //count your columns from left to right starting from 0
 	    //and write here the number of the column 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  //la data ha già l'anno di due cifre
    begin
     PaintString := Copy(PaintString, 1, 9);
     case n of
      16:
       PaintString := PaintString + ' ' + Copy(tmpString, 10, 4);
      //if you like hours from 0 to 9 starting with 0, put a 0 inside ' ' 
      //instead of the space
      17:
       PaintString := PaintString + ' ' + Copy(tmpString, 10, 5);
      //if you like hours from 0 to 9 starting with 0, put a 0 inside ' ' 
      //instead of the space
     end; //case
    end 
    else  //la data ha l'anno di quattro cifre
    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 like hours from 0 to 9 starting with 0, put a 0 inside ' ' 
      //instead of the space
      
     end; //case
    end; //if
   
 end; //case
 
end;
result:=PaintString;
end;

begin
end.
-- 
random anagram: Tony Blair, MP = I'm Tory plan B
Maria Luisa C - 18/01/04 19.50.30, here.
http://fido.altervista.org/
Technical Details
Message-ID: <qw2qym20kem$.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-250-203.26-151.libero.IT!not-for-mail
References: <16jk4x86rgg92$.dlg@coconino.nl> <wkdwnbaov1ug.mx23ia318zs4$.dlg@40tude.net> <1854n4rci62rw$.dlg@coconino.nl>

Show Full Headers
Complete Article Headers
Message-ID: <qw2qym20kem$.dlg@ID-187316.user.uni-berlin.de>
Subject: Re: [Dialog]
Date: Sun, 18 Jan 2004 20:10:52 +0100
From: MLC <maluc52@yahoo.it>
References: <16jk4x86rgg92$.dlg@coconino.nl> <wkdwnbaov1ug.mx23ia318zs4$.dlg@40tude.net> <1854n4rci62rw$.dlg@coconino.nl>
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-250-203.26-151.libero.IT!not-for-mail
Newsgroups: news.software.readers
Organization: none
Lines: 76
Reply-To: mlcald@msn.com
NNTP-Posting-Host: ppp-250-203.26-151.libero.it (151.26.203.250)
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 1074453061 17546250 151.26.203.250 ([187316])
User-Agent: 40tude_Dialog/2.0.10.1it (94e50ce2.241.316)
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