🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #141586

Re: [Dialog]

#141586
From: Jeff Relf
Date: Mon, 19 Jan 2004 05:52
51 lines
3097 bytes
Hi MLC ,  Re:  Your program OnArticleListPaint; ,
  My thanks goes out to you yet again !
I've  Long  wanted to change the date format .

Dialog must be using the system setting for the time format ,
  because my time format was quite different from yours .

Plus I only ever keep 5 days worth of posts ,
  so I never want to see the month ,  much less the year .

My time stamp now looks like this :
  3   9.02  //  The  3rd day ,  AM ,   9:02
 18. 10.15  //  The 18th day ,  PM ,  10:15
   ^  This is the PM indicator ,
         The entire timestamp is always 9 characters wide .

Although I doubt it would work for anyone but me ,
  Here's the script :

Program OnArticleListPaint;
function OnArticleListPaint( PaintString: widestring; 
  ColumnIndex: integer ): widestring;
  var X: Integer;  
    MM_DD, HH_MM_SS_AM, BHH_MM, Day,  PM,  H,  M : WideString;
begin
  case ColumnIndex of 3: //  Date column ,  from 0
    begin
      X := pos( '/', paintstring);
      MM_DD := copy( paintstring, X+ 1, 2 );   
      X := pos( ' ', paintstring);
      BHH_MM := copy( paintstring, X, 6 );     
      HH_MM_SS_AM := copy( paintstring, X + 1, 10 );     
      X := pos( ' ', HH_MM_SS_AM);
      PM := copy( HH_MM_SS_AM, X + 1, 1 );
      if PM = 'P' then PM := '.' else PM := ' ';     
      Day := copy( MM_DD, 1, 2);
      if copy( Day, 2, 1) = '/' then 
        Day := ' ' + copy( Day, 1, 1);
      if  copy( BHH_MM, 3, 1) = ':'  then begin
        H := copy( BHH_MM, 1, 2);  M := copy( BHH_MM, 4, 2);
      end  else begin 
        H := copy( BHH_MM, 2, 2); M := copy( BHH_MM, 5, 2);
      end;
      paintstring :=  
        Day +  PM +  ' '  +  H +  '.' +  M ;
    end; 
  end; // case      
  result := paintstring;
end;
begin end.
Technical Details
Message-ID: <1k4uupcw5xmk8.dlg@x.Jeff.Relf>
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!64-40-51-12.ncplus.NET!not-for-mail
References: <16jk4x86rgg92$.dlg@coconino.nl> <wkdwnbaov1ug.mx23ia318zs4$.dlg@40tude.net> <1854n4rci62rw$.dlg@coconino.nl> <qw2qym20kem$.dlg@ID-187316.user.uni-berlin.de>

Show Full Headers
Complete Article Headers
Message-ID: <1k4uupcw5xmk8.dlg@x.Jeff.Relf>
Subject: Re: [Dialog]
Date: Sun, 18 Jan 2004 21:52:15 -0800
From: Jeff Relf <Me@Privacy.NET>
References: <16jk4x86rgg92$.dlg@coconino.nl> <wkdwnbaov1ug.mx23ia318zs4$.dlg@40tude.net> <1854n4rci62rw$.dlg@coconino.nl> <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!64-40-51-12.ncplus.NET!not-for-mail
Newsgroups: news.software.readers
Lines: 51
NNTP-Posting-Host: 64-40-51-12.ncplus.net (64.40.51.12)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 1074491519 18138053 64.40.51.12 ([177113])
User-Agent: 40tude_Dialog/2.0.10.1
X-Face: V|9[5IY]/OB15+<DlkA6*rsaeJb?9HnEE@[CAy1koT:N4Ew'*#35g{6z1>}/e:m!6.qw'Kzn@$#""CJQl/Uv"R,&G?sNO"{#LEEnS3lQRnT#Ql#'3ySQ80}u7Q<`+B@;
 Y; 81AnK'_PD^fm.3T/<-i~YdZ%Q}b?:-]{Lr#s6.N,r(}
X-Newsreader: Win98 C++