Article View: news.software.readers
Article #148665[Dialog] New version of the Date column formatting script
From: Antonio 'Gandalf' Favata
Date: Sat, 22 May 2004 05:05
Date: Sat, 22 May 2004 05:05
51 lines
2719 bytes
2719 bytes
New! Now even more customizable! :)
program OnArticleListPaint;
// ideas from MLC, Andreas "Penny" Oeser,
// Christian Sattler, Nico Haase, myself
const
colDate = 3; //count your columns from left to right starting from 0
//and write here the number of the column with the date;
dateFmt = 'dd/mm'; // refer to dialog.chm::/date_timeformatstrings.htm
timeFmt = 'hh:mm'; // refer to dialog.chm::/date_timeformatstrings.htm
todayStr = '(oggi)'; // "today" in your language and with your favourite formatting
invert = true; // set this to false if you don't want to invert date and time
function OnArticleListPaint(PaintString:widestring; ColumnIndex:integer):widestring;
var
fmt : String;
begin
if ColumnIndex = colDate then
begin
if DateToStr(StrToDateTime(PaintString))= DateToStr(now) then
fmt := '"'+todayStr+'"'
else
fmt := dateFmt;
if invert then
fmt := timeFmt + ' ' + fmt
else
fmt := fmt + ' ' + timeFmt;
PaintString := FormatDateTime(fmt, StrToDateTime(PaintString));
end;
result := PaintString;
end;
begin
end.
Feel free to use and/or put in Wiki [the older version is already there]
--
Fare Well! FIAG member | Free mail & news | 40tude Dialog v2.0.12.1
G www.fiag.it | www.x-planet.org | http://snurl.com/dialog
Mozilla (Suite, Firefox, Thunderbird): news:it-alt.comp.software.mozilla
Technical Details
Message-ID:
<1jjhc5am4nehy$.dlg@gandalf.my-fqdn.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!number1.nntp.dca.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!news.glorb.com!news.jgaa.com!x-privat.net!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <1jjhc5am4nehy$.dlg@gandalf.my-fqdn.de> Subject: [Dialog] New version of the Date column formatting script Date: Sat, 22 May 2004 07:05:46 +0200 From: Antonio 'Gandalf' Favata <gandalf@ithn.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!number1.nntp.dca.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!news.glorb.com!news.jgaa.com!x-privat.net!not-for-mail Newsgroups: news.software.readers User-Agent: 40tude_Dialog/2.0.12.1it (8be5dd28.428.31) Hamster-Pg/1.15 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: gandalf@x-planet.org Organization: FIAG X-Face: &]^_njQjKuBI.th%)W1+ESkFY4E:r*#8}rkHLF'QTLo, >mql9aGkV*, v.-, qVdu&8Xk(6K X-Headers: Move along, nothing to see here. Lines: 51 X-Complaints-To: abuse@x-privat.net