šŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
19 messages
19 total messages Started by CyberDroog Sun, 08 Feb 2004 01:59
Dialog - Date String
#143079
Author: CyberDroog
Date: Sun, 08 Feb 2004 01:59
15 lines
1702 bytes
Does anyone know how to add leading zeros to the date string in the headers
list?  There are a couple of date alteration scripts on the Dialog Wiki,
but neither one works.  Since I'm not familiar with Pascal, I don't know
how to get started.

Thanks for any suggestions.


-- 
We cannot but be astonished at the ease with which men resign themselves
to ignorance about what is most important for them to know; and we may be
certain that they are determined to remain invincibly ignorant if they once
come to consider it as axiomatic that there are no absolute principles.

  - Fredric Bastiat
Re: Dialog - Date String
#143086
Author: Gember Breuk
Date: Sun, 08 Feb 2004 03:27
13 lines
1526 bytes
On Sun, 08 Feb 2004 01:59:08 GMT, CyberDroog wrote:

> Does anyone know how to add leading zeros to the date string in the headers
> list?  There are a couple of date alteration scripts on the Dialog Wiki,
> but neither one works.  Since I'm not familiar with Pascal, I don't know
> how to get started.

Have you tried to just set the "Short Date Format" in the Windows
Control Panel  "Regional Settings" to the way you want?


-- 
Gem
Re: Dialog - Date String
#143095
Author: MLC
Date: Sun, 08 Feb 2004 08:38
72 lines
3321 bytes
domenica 08/feb/2004 _CyberDroog_ ha scritto:

> Does anyone know how to add leading zeros to the date string in the headers
> list?  There are a couple of date alteration scripts on the Dialog Wiki,
> but neither one works.  Since I'm not familiar with Pascal, I don't know
> how to get started.
> 
> Thanks for any suggestions.

Hi,
I saw only last night that in Wiki there is a Gandalf's variation of a
script of mines and I think me too that that version doesn't work very well.
If you want, try my original version and let us know.
This version takes into account the different date settings (long or short):
(read the comments inside)

program OnArticleListPaint;
const
               
 colDate=5; // in the headers panel count the columns from left
            // to right starting from 0 and write here the
            // number of the coulumn 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  // two digits year
   begin
    PaintString := Copy(PaintString, 1, 9);
    case n of
     16:
     PaintString := PaintString + ' ' + Copy(tmpString, 10, 4);
     17:
     PaintString := PaintString + ' ' + Copy(tmpString, 10, 5);
    end;
   end  
   else  // four digits year
   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 want hours from 0 to 9 starting with 0, in the above line 
     //put a 0 inside ' ' instead of a space
     
    end; //case
   end; //if  
 end; //case 
end;
result:=PaintString;
end;

begin
end.
-- 
Maria Luisa C - 08/02/04 9.23.10, here.
7/9 di tutorial su Dialog:
http://fido.altervista.org/Dialog/dialog.php
Re: Dialog - Date String
#143100
Author: Antonio 'Gandalf' Favata
Date: Sun, 08 Feb 2004 12:15
23 lines
2238 bytes
MLC on news.software.readers:

> I saw only last night that in Wiki there is a Gandalf's
> variation of a script of mines and I think me too that that
> version doesn't work very well.

For me it works, but my version and your one do different 
things (at least for now, I'll work on mine to extend its 
functionalities).

> If you want, try my original version and let us know.

I think your version should be on Wiki too (before mine).

> This version takes into account the different date settings
> (long or short):

Also mine should :)
-- 
Fare Well! | Freeware powerful newsreader with multilingual GUI
G          | 40tude Dialog 2.0.10.1 ~ <http://snurl.com/dialog>
                  Su it.news.annunci, CFV per it.fan.tv.scrubs:
                  <news:MK.it.fan.tv.scrubs.1.3@id.news.nic.it>
Re: Dialog - Date String
#143101
Author: MLC
Date: Sun, 08 Feb 2004 13:33
27 lines
2084 bytes
domenica 08/feb/2004 _Antonio 'Gandalf' Favata_ ha scritto:

> MLC on news.software.readers:
> 
>> I saw only last night that in Wiki there is a Gandalf's
>> variation of a script of mines and I think me too that that
>> version doesn't work very well.
> 
> For me it works, but my version and your one do different 
> things (at least for now, I'll work on mine to extend its 
> functionalities).

OK :) 
(I had a bad hours display)

> 
>> If you want, try my original version and let us know.
> 
> I think your version should be on Wiki too (before mine).
> 

Done. Now we are separated! ;-))

-- 
Maria Luisa C - 08/02/04 14.21.00, here.
7/9 di tutorial su Dialog:
http://fido.altervista.org/Dialog/dialog.php
Re: Dialog - Date String
#143102
Author: Jarrod Cifer
Date: Sun, 08 Feb 2004 14:03
9 lines
1878 bytes
MLC, upon reaching nirvana, postulated:

>> I think your version should be on Wiki too (before mine). 
> Done. Now we are separated! ;-))

Good stuff! You really should create a Wiki account though, it would look a
lot nicer to see your name rather than your IP address.
-- 
J. Cifer
Re: Dialog - Date String
#143109
Author: Antonio 'Gandalf' Favata
Date: Sun, 08 Feb 2004 15:30
14 lines
2032 bytes
MLC on news.software.readers:

> (I had a bad hours display)

Then it may need a tuning anyway. What's your original format?

> Done. Now we are separated! ;-))

Nothing personal, I hope :)
-- 
Fare Well! | Freeware powerful newsreader with multilingual GUI
G          | 40tude Dialog 2.0.10.1 ~ <http://snurl.com/dialog>
     Su it.news.annunci, CFV per it.comp.software.office-suite:
     <news:MK.it.comp.software.office-suite.0.2@id.news.nic.it>
Re: Dialog - Date String
#143112
Author: MLC
Date: Sun, 08 Feb 2004 15:32
17 lines
1959 bytes
domenica 08/feb/2004 _Jarrod Cifer_ ha scritto:

> MLC, upon reaching nirvana, postulated:
> 
>>> I think your version should be on Wiki too (before mine). 
>> Done. Now we are separated! ;-))
> 
> Good stuff! You really should create a Wiki account though, it would look a
> lot nicer to see your name rather than your IP address.

Hi Jarrod,
how can I create a Wiki account ?

-- 
Maria Luisa C - 08/02/04 16.28.52, here.
7/9 di tutorial su Dialog:
http://fido.altervista.org/Dialog/dialog.php
Re: Dialog - Date String
#143113
Author: MLC
Date: Sun, 08 Feb 2004 15:40
24 lines
1984 bytes
domenica 08/feb/2004 _Antonio 'Gandalf' Favata_ ha scritto:

> MLC on news.software.readers:
> 
>> (I had a bad hours display)
> 
> Then it may need a tuning anyway. What's your original format?

dd/mm/yy
When I tried it, I saw hours like
.9.38 (leading . )
or
56 (or .56 I don't remember well) for a post sent 56 minutes after midnight.

> 
>> Done. Now we are separated! ;-))
> 
> Nothing personal, I hope :)

Nooo, I love you, you know ;-)
-- 
Maria Luisa C - 08/02/04 16.34.16, here.
7/9 di tutorial su Dialog:
http://fido.altervista.org/Dialog/dialog.php
Re: Dialog - Date String
#143117
Author: Antonio 'Gandalf' Favata
Date: Sun, 08 Feb 2004 16:53
23 lines
2293 bytes
MLC on news.software.readers:

>>> (I had a bad hours display)
>> Then it may need a tuning anyway. What's your original format?
> dd/mm/yy

And what about the hours?

> When I tried it, I saw hours like
[bad mess]

Ugh :/
I'll review it in the next few days, I hope :)

>> Nothing personal, I hope :)
> Nooo, I love you, you know ;-)

#^__^# (<italian> Beccati questa, Alan ;PPP </italian>)
-- 
Fare Well! | Freeware powerful newsreader with multilingual GUI
G          | 40tude Dialog 2.0.10.1 ~ <http://snurl.com/dialog>
                  Su it.news.annunci, CFV per it.fan.tv.scrubs:
                  <news:MK.it.fan.tv.scrubs.1.3@id.news.nic.it>
Re: Dialog - Date String
#143121
Author: Alan Ford
Date: Sun, 08 Feb 2004 17:10
12 lines
1943 bytes
Di /domenica, 08 febbraio 2004/, *Antonio 'Gandalf' Favata* ha scritto:

>> Nooo, I love you, you know ;-)
> #^__^# (<italian> Beccati questa, Alan ;PPP </italian>)

LIE, actually she loves me! ;oƞ

Bye.

-- 
 /   _ _ | Xnews e la documentazione in italiano
( (/( (/ | http://web.lacasadialice.it/alanford/
Re: Dialog - Date String
#143123
Author: Jarrod Cifer
Date: Sun, 08 Feb 2004 18:08
9 lines
1950 bytes
MLC, upon reaching nirvana, postulated: 

> Hi Jarrod, how can I create a Wiki account ?

By using the Sign in field at the top of the Wiki pages. Just Type in a
Wiki name you would like your edits to be shown under. MariaLuisaC
immediately comes to mind. ;-)
-- 
J. Cifer
Re: Dialog - Date String
#143126
Author: MLC
Date: Sun, 08 Feb 2004 18:21
15 lines
1977 bytes
domenica 08/feb/2004 _Jarrod Cifer_ ha scritto:

> MLC, upon reaching nirvana, postulated: 
> 
>> Hi Jarrod, how can I create a Wiki account ?
> 
> By using the Sign in field at the top of the Wiki pages. Just Type in a
> Wiki name you would like your edits to be shown under. MariaLuisaC
> immediately comes to mind. ;-)

Thank you, I'll do it. :)
-- 
Maria Luisa C - 08/02/04 19.20.59, here.
7/9 di tutorial su Dialog:
http://fido.altervista.org/Dialog/dialog.php
Re: Dialog - Date String
#143149
Author: CyberDroog
Date: Mon, 09 Feb 2004 00:47
23 lines
2070 bytes
On Sat, 7 Feb 2004 22:27:01 -0500, Gember Breuk <me2@privacy.net> wrote:

>On Sun, 08 Feb 2004 01:59:08 GMT, CyberDroog wrote:
>
>> Does anyone know how to add leading zeros to the date string in the headers
>> list?  There are a couple of date alteration scripts on the Dialog Wiki,
>> but neither one works.  Since I'm not familiar with Pascal, I don't know
>> how to get started.
>
>Have you tried to just set the "Short Date Format" in the Windows
>Control Panel  "Regional Settings" to the way you want?

I could, but I don't necessarily want that same format for all other
programs that might use it.  I want it in Dialog because I don't really
care for the time a message was posted, and I want the date field to be a
fixed length.

---
CONVENT, n. A place of retirement for woman who wish for leisure to
meditate upon the vice of idleness.

  - Ambrose Bierce
Re: Dialog - Date String
#143152
Author: Gember Breuk
Date: Mon, 09 Feb 2004 01:13
24 lines
2088 bytes
On Mon, 09 Feb 2004 00:47:01 GMT, CyberDroog wrote:

> On Sat, 7 Feb 2004 22:27:01 -0500, Gember Breuk <me2@privacy.net> wrote:
> 
>>On Sun, 08 Feb 2004 01:59:08 GMT, CyberDroog wrote:
>>
>>> Does anyone know how to add leading zeros to the date string in the headers
>>> list?  There are a couple of date alteration scripts on the Dialog Wiki,
>>> but neither one works.  Since I'm not familiar with Pascal, I don't know
>>> how to get started.
>>
>>Have you tried to just set the "Short Date Format" in the Windows
>>Control Panel  "Regional Settings" to the way you want?
> 
> I could, but I don't necessarily want that same format for all other
> programs that might use it.  I want it in Dialog because I don't really
> care for the time a message was posted, and I want the date field to be a
> fixed length.

Ah, ok then, that is a little different. Maybe Maria's script from her
post will work good for you I hope.

-- 
Gem
Re: Dialog - Date String
#143157
Author: CyberDroog
Date: Mon, 09 Feb 2004 02:56
33 lines
2587 bytes
On Sun, 8 Feb 2004 20:13:45 -0500, Gember Breuk wrote:

> On Mon, 09 Feb 2004 00:47:01 GMT, CyberDroog wrote:
> 
>> On Sat, 7 Feb 2004 22:27:01 -0500, Gember Breuk <me2@privacy.net> wrote:
>> 
>>>On Sun, 08 Feb 2004 01:59:08 GMT, CyberDroog wrote:
>>>
>>>> Does anyone know how to add leading zeros to the date string in the headers
>>>> list?  There are a couple of date alteration scripts on the Dialog Wiki,
>>>> but neither one works.  Since I'm not familiar with Pascal, I don't know
>>>> how to get started.
>>>
>>>Have you tried to just set the "Short Date Format" in the Windows
>>>Control Panel  "Regional Settings" to the way you want?
>> 
>> I could, but I don't necessarily want that same format for all other
>> programs that might use it.  I want it in Dialog because I don't really
>> care for the time a message was posted, and I want the date field to be a
>> fixed length.
> 
> Ah, ok then, that is a little different. Maybe Maria's script from her
> post will work good for you I hope.

It didn't.  It just caused a garbled date display.  I'll have to fiddle
with it to see what is going on.  Maybe my default date format isn't the
same as hers.

-- 
In war, the stronger overcomes the weaker. In business, the stronger
imparts strength to the weaker.

  - Fredric Bastiat
Re: Dialog - Date String
#143160
Author: Gember Breuk
Date: Mon, 09 Feb 2004 03:31
36 lines
2736 bytes
On Mon, 09 Feb 2004 02:56:38 GMT, CyberDroog wrote:

> On Sun, 8 Feb 2004 20:13:45 -0500, Gember Breuk wrote:
> 
>> On Mon, 09 Feb 2004 00:47:01 GMT, CyberDroog wrote:
>> 
>>> On Sat, 7 Feb 2004 22:27:01 -0500, Gember Breuk <me2@privacy.net> wrote:
>>> 
>>>>On Sun, 08 Feb 2004 01:59:08 GMT, CyberDroog wrote:
>>>>
>>>>> Does anyone know how to add leading zeros to the date string in the headers
>>>>> list?  There are a couple of date alteration scripts on the Dialog Wiki,
>>>>> but neither one works.  Since I'm not familiar with Pascal, I don't know
>>>>> how to get started.
>>>>
>>>>Have you tried to just set the "Short Date Format" in the Windows
>>>>Control Panel  "Regional Settings" to the way you want?
>>> 
>>> I could, but I don't necessarily want that same format for all other
>>> programs that might use it.  I want it in Dialog because I don't really
>>> care for the time a message was posted, and I want the date field to be a
>>> fixed length.
>> 
>> Ah, ok then, that is a little different. Maybe Maria's script from her
>> post will work good for you I hope.
> 
> It didn't.  It just caused a garbled date display.  I'll have to fiddle
> with it to see what is going on.  Maybe my default date format isn't the
> same as hers.

Yes, that can be the problem. If I try the script with short format set
as "m-d-yy", it does not work right. Setting to "mm/dd/yyyy" makes the
script work just right only 2 digit year and no time.

-- 
Gem
Re: Dialog - Date String
#143361
Author: Jeff Relf
Date: Wed, 11 Feb 2004 09:25
51 lines
3025 bytes
Hi CyberDroog,
  Re:  How to display a fixed-length short-date
  in the article list,
You comment,
" I don't really care for the time a message was posted,
    and I want the date field to be a fixed length ",

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 .

The script below only works for the  m/d/yy  short-date ...

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 - Date String
#143389
Author: Antonio 'Gandalf' Favata
Date: Thu, 12 Feb 2004 00:04
10 lines
1951 bytes
Alan Ford on news.software.readers:

>>> Nooo, I love you, you know ;-)
>> #^__^# (<italian> Beccati questa, Alan ;PPP </italian>)
> LIE, actually she loves me! ;oƞ

You can bet on it, we *all* love you ;)
-- 
Fare Well! | Freeware powerful newsreader with multilingual GUI
G          | 40tude Dialog 2.0.10.1 ~ <http://snurl.com/dialog>
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