Article View: news.software.readers
Article #144323Re: [Dialog] shortened date possible?
From: 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!
Technical Details
Message-ID:
<93inpvch23p1.dlg@mymoose.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.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed3.easynews.com!easynews.com!easynews!easynews-local!news.easynews.com.POSTED!not-for-mailReferences:
<bvceo6t1q2xv.dlg@mymoose.net> <si70wuxfrcgv$.dlg@x.Jeff.Relf>Show Full Headers
Complete Article Headers
Message-ID: <93inpvch23p1.dlg@mymoose.net> Subject: Re: [Dialog] shortened date possible? Date: Sun, 29 Feb 2004 22:24:47 GMT From: Kristi <a@b.net> References: <bvceo6t1q2xv.dlg@mymoose.net> <si70wuxfrcgv$.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.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed3.easynews.com!easynews.com!easynews!easynews-local!news.easynews.com.POSTED!not-for-mail Newsgroups: news.software.readers User-Agent: 40tude_Dialog/2.0.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: a <> Organization: none X-Face: Gf;u@q.=NP6%lIBiFi7lE=?;Xr3<$#~|R$G X-No-Archive: yes Lines: 65 X-Complaints-To: abuse@easynews.com X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.