Thread View: news.software.readers
3 messages
3 total messages
Started by Kristi
Sat, 28 Feb 2004 17:32
[Dialog] shortened date possible?
Author: Kristi
Date: Sat, 28 Feb 2004 17:32
Date: Sat, 28 Feb 2004 17:32
8 lines
1322 bytes
1322 bytes
is there an option or something to allow Dialog to display a simplified date (like Xnews or Pocomail). tia Kristi -- Shuttle AN35N Ultra, XP2600Bart(11.5x400), 512mb, GeF3Ti200, WinXPproSP1. Defragger Raxco PerfectDisk6 rocks! fast!
Re: [Dialog] shortened date possible?
Author: Jeff Relf
Date: Sun, 29 Feb 2004 06:49
Date: Sun, 29 Feb 2004 06:49
59 lines
3282 bytes
3282 bytes
Hi Kristi, You asked,
" is there an option or something
to allow Dialog to display a simplified date " .
The date fields in the list of messages
can be set with a script.
I always use a large fixed-width font,
so mine is always 9 characters wide, for example:
9 10.30 // 10:30 AM on the 9th,
10. 9.15 // 9:15 PM on the 10th.
^ This is the PM indicator .
I only ever keep 5 days worth of posts ,
so I never want to see the month , much less the year .
The script below only works
if your short date in Windows is set to the m/d/yy :
control panel --> Regional settings --> Date ( a Tab )
You need to paste and compile the script here:
Settings --> Scripting --> Scripting
--> Event Scripts ( a tab ) --> OnArticleListPaint
If your date-column isn't at 3
( counting from the left and starting with zero )
then you need to change that number.
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.
Re: [Dialog] shortened date possible?
Author: Kristi
Date: Sun, 29 Feb 2004 22:24
Date: Sun, 29 Feb 2004 22:24
65 lines
3503 bytes
3503 bytes
Jeff Relf wrote: > Hi Kristi, You asked, > " is there an option or something > to allow Dialog to display a simplified date " . > > The date fields in the list of messages > can be set with a script. > I always use a large fixed-width font, > so mine is always 9 characters wide, for example: > 9 10.30 // 10:30 AM on the 9th, > 10. 9.15 // 9:15 PM on the 10th. > ^ This is the PM indicator . > > I only ever keep 5 days worth of posts , > so I never want to see the month , much less the year . > > The script below only works > if your short date in Windows is set to the m/d/yy : > control panel --> Regional settings --> Date ( a Tab ) > > You need to paste and compile the script here: > Settings --> Scripting --> Scripting > --> Event Scripts ( a tab ) --> OnArticleListPaint > > If your date-column isn't at 3 > ( counting from the left and starting with zero ) > then you need to change that number. > > 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. Thanks Jeff, this gave me a place to start. Kristi -- Shuttle AN35N Ultra, XP2600Bart(11.5x400), 512mb, GeF3Ti200, WinXPproSP1. Defragger Raxco PerfectDisk6 rocks! fast!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads