Thread View: news.software.readers
22 messages
22 total messages
Started by Thomas Edison
Thu, 10 Jun 2004 00:45
[Dialog] Date and Time
Author: Thomas Edison
Date: Thu, 10 Jun 2004 00:45
Date: Thu, 10 Jun 2004 00:45
7 lines
1174 bytes
1174 bytes
Is there any way of making the display of the time that a message was sent (in the message list) _not_ show seconds? e.g. on my screen I see: 09/06/2004 14:46:12 Is there any way to remove the ":12".
Re: [Dialog] Date and Time
Author: MLC
Date: Thu, 10 Jun 2004 07:29
Date: Thu, 10 Jun 2004 07:29
37 lines
2278 bytes
2278 bytes
giovedì 10/giu/2004 _Thomas Edison_ ha scritto:
> Is there any way of making the display of the time that a message was sent
> (in the message list) _not_ show seconds?
>
> e.g. on my screen I see:
> 09/06/2004 14:46:12
>
> Is there any way to remove the ":12".
Yes, with a script in the OnArticleListPaint event.
(write your correct settings in the const section and remove the leading ||)
|| program OnArticleListPaint;
|| const
|| colDate = 5; //count the columns from left to right starting
|| //from 0 and write here the number of the column Date
|| dateFmt = 'dd/mm/yyyy hh:mm'; //or yy (instead of yyyy) for a 2 digits year
|| function OnArticleListPaint(PaintString:widestring; ColumnIndex:integer):widestring;
|| var fmt : String;
|| begin
|| if ColumnIndex = colDate then fmt := dateFmt;
|| PaintString := FormatDateTime(fmt, StrToDateTime(PaintString));
|| result := PaintString;
|| end;
|| begin
|| end.
--
Maria Luisa C - 10/06/2004 9.07.01
Re: [Dialog] Date and Time
Author: /betty/
Date: Thu, 10 Jun 2004 10:55
Date: Thu, 10 Jun 2004 10:55
30 lines
2440 bytes
2440 bytes
On Thu, 10 Jun 2004 01:45:44 +0100, Thomas Edison used 7 lines in response: > Is there any way of making the display of the time that a message was sent > (in the message list) _not_ show seconds? > > e.g. on my screen I see: > 09/06/2004 14:46:12 Not natively. Dialog only adheres to the Date, not Time, component of 'Shortdate' in System regional settings -- so as you've probably found changing that doesn't work. Which to me is understandable for D because, for one thing, Time format is pretty much an International constant (even in ISO-8601 standard), whereas most people still prefer Date to be localised. Also, personally I think it's useful to display to seconds resolution in the UI ML column (is an accurate confirmation of each posts lodgement time, where headers only are available; for example), but you obviously don't need it. Your choice. > > Is there any way to remove the ":12". Yes, see MLC's followup; MiD: <198riihzxidak.dlg@ID-187316.user.uni-berlin.de> -- /betty/ [2004-06-10 20:31:48]
Re: [Dialog] Date and Time
Author: foxidrive
Date: Thu, 10 Jun 2004 11:34
Date: Thu, 10 Jun 2004 11:34
12 lines
1562 bytes
1562 bytes
On Thu, 10 Jun 2004 09:29:44 +0200, MLC wrote: > Yes, with a script in the OnArticleListPaint event. > (write your correct settings in the const section and remove the leading ||) > >|| program OnArticleListPaint; Thanks for that, MLC, but I had something curious occur. See http://members.aardvark.net.au/micm/articlelistpaint.gif All msgs with 23(24?) lines or less had the lines replaced with the date. Any idea why this occurs?
Re: [Dialog] Date and Time
Author: Enrico Bauer
Date: Thu, 10 Jun 2004 13:50
Date: Thu, 10 Jun 2004 13:50
19 lines
2064 bytes
2064 bytes
10.06.2004 13:34:56, *foxidrive*: > On Thu, 10 Jun 2004 09:29:44 +0200, MLC wrote: >> Yes, with a script in the OnArticleListPaint event. >> (write your correct settings in the const section and remove the leading ||) >>|| program OnArticleListPaint; > Thanks for that, MLC, but I had something curious occur. > See http://members.aardvark.net.au/micm/articlelistpaint.gif > All msgs with 23(24?) lines or less had the lines replaced with the date. > Any idea why this occurs? Because a day has not more than 24 hours? ;-) You changed the order of the columns, did you consider this with the "//count the columns from left to right starting"-entry? Enrico B. -- No fear. No distractions. The ability to let that which does not matter truly slide.
Re: [Dialog] Date and Time
Author: /betty/
Date: Thu, 10 Jun 2004 14:05
Date: Thu, 10 Jun 2004 14:05
22 lines
2190 bytes
2190 bytes
On Thu, 10 Jun 2004 09:29:44 +0200, MLC used 37 lines in response:
>
>|| program OnArticleListPaint;
>
>|| const
>|| colDate = 5; //count the columns from left to right starting
>|| //from 0 and write here the number of the column Date
>
>|| dateFmt = 'dd/mm/yyyy hh:mm'; //or yy (instead of yyyy) for a 2 digits year
^^^^^^^^^^
Q1: Will your hardcoding that as a constant over-ride, or if not
conflict with, the users system set regional Shortdate that Dialog
appears to inherit and use defacto for its display?
Q2: I assume that available date formats are only those consistent with
native Windows version regionals, or, can you roll your own in D
scripts?
--
/betty/ [2004-06-10 23:54:19]
Re: [Dialog] Date and Time
Author: MLC
Date: Thu, 10 Jun 2004 14:37
Date: Thu, 10 Jun 2004 14:37
36 lines
2650 bytes
2650 bytes
giovedì 10/giu/2004 _/betty/_ ha scritto: > On Thu, 10 Jun 2004 09:29:44 +0200, MLC used 37 lines in response: > >> >>|| program OnArticleListPaint; >> >>|| const >>|| colDate = 5; //count the columns from left to right starting >>|| //from 0 and write here the number of the column Date >> >>|| dateFmt = 'dd/mm/yyyy hh:mm'; //or yy (instead of yyyy) for a 2 digits year > ^^^^^^^^^^ > > Q1: Will your hardcoding that as a constant over-ride, or if not > conflict with, the users system set regional Shortdate that Dialog > appears to inherit and use defacto for its display? If I understand the question, it's a costant override. My system, for example, is set with this kind of date format: dd/mm/yyyy but in the script I have this format: dd.mm.yy (note also the . instead of / ) and Dialog displays the date this way. > > Q2: I assume that available date formats are only those consistent with > native Windows version regionals, or, can you roll your own in D > scripts? You can roll them as you like. In this Dialog help page dialog.chm::/date_timeformatstrings.htm there are many options you can pick up. -- Maria Luisa C - 10/06/2004 16.25.02, here.
Re: [Dialog] Date and Time
Author: /betty/
Date: Thu, 10 Jun 2004 15:10
Date: Thu, 10 Jun 2004 15:10
37 lines
2820 bytes
2820 bytes
On Thu, 10 Jun 2004 16:37:41 +0200, MLC used 36 lines in response: > giovedì 10/giu/2004 _/betty/_ ha scritto: > >> Q1: Will your hardcoding that as a constant over-ride, or if not >> conflict with, the users system set regional Shortdate that Dialog >> appears to inherit and use defacto for its display? > > If I understand the question, it's a costant override. > My system, for example, is set with this kind of date format: > dd/mm/yyyy > but in the script I have this format: > dd.mm.yy (note also the . instead of / ) > and Dialog displays the date this way. > Yes you understood the question well. Thanks for the confirmation. >> native Windows version regionals, or, can you roll your own in D >> scripts? > > You can roll them as you like. In this Dialog help page > dialog.chm::/date_timeformatstrings.htm > there are many options you can pick up. (-: Ta. I tend to shy away from the Help because; a. it's nearly as outdated as me eg. "About this help (Ver. 2.0.3.1c)" b. it _still_ won't open maxed, or per set size :-( (no thanks, a script is _not_ an acceptable solution for a programs OS disobediance!) c. I have ActiveX restrictions in place, so win2k growls at me [savagely!] when I open it. -- /betty/ [2004-06-11 00:56:45]
Re: [Dialog] Date and Time
Author: MLC
Date: Thu, 10 Jun 2004 17:46
Date: Thu, 10 Jun 2004 17:46
47 lines
2745 bytes
2745 bytes
giovedì 10/giu/2004 _foxidrive_ ha scritto: > On Thu, 10 Jun 2004 09:29:44 +0200, MLC wrote: > >> Yes, with a script in the OnArticleListPaint event. >> (write your correct settings in the const section and remove the leading ||) >> >>|| program OnArticleListPaint; > > Thanks for that, MLC, but I had something curious occur. > See http://members.aardvark.net.au/micm/articlelistpaint.gif > > All msgs with 23(24?) lines or less had the lines replaced with the date. > Any idea why this occurs? My bad! :( In the hurry this morning I left out the if block. Sorry for that! This *should* be correct (let me know please): || program OnArticleListPaint; || const || colDate = 5; //count the columns from left to right starting || //from 0 and write here the number of the column Date || dateFmt = 'dd/mm/yyyy hh:mm'; //or yy (instead of yyyy) for a 2 digits year || function OnArticleListPaint(PaintString:widestring; ColumnIndex:integer):widestring; || || var fmt : String; || begin || if ColumnIndex = colDate then || begin || fmt := dateFmt; || PaintString := FormatDateTime(fmt, StrToDateTime(PaintString)); || result := PaintString; || end; || end; || begin || end. -- Maria Luisa C - 10/06/2004 19.43.45, here.
Re: [Dialog] Date and Time
Author: Thomas Edison
Date: Thu, 10 Jun 2004 20:43
Date: Thu, 10 Jun 2004 20:43
8 lines
1197 bytes
1197 bytes
On Thu, 10 Jun 2004 01:45:44 +0100, Thomas Edison wrote: <snip> Thanks for the replies. I'll take a look into Dialog scripting when I have the time. Cheers
Re: [Dialog] Date and Time
Author: Mark Question
Date: Fri, 11 Jun 2004 00:42
Date: Fri, 11 Jun 2004 00:42
13 lines
1381 bytes
1381 bytes
On Thu, 10 Jun 2004 21:43:57 +0100, Thomas Edison wrote: > On Thu, 10 Jun 2004 01:45:44 +0100, Thomas Edison wrote: > > <snip> > > Thanks for the replies. I'll take a look into Dialog scripting when I have > the time. > > Cheers Why not just shove the date column (if it's at the right side, as by default) just a bit more to the right, so the seconds vanish?
Re: [Dialog] Date and Time
Author: foxidrive
Date: Fri, 11 Jun 2004 03:07
Date: Fri, 11 Jun 2004 03:07
35 lines
2303 bytes
2303 bytes
On Thu, 10 Jun 2004 19:46:30 +0200, MLC wrote: >> On Thu, 10 Jun 2004 09:29:44 +0200, MLC wrote: >> >>> Yes, with a script in the OnArticleListPaint event. >>> (write your correct settings in the const section and remove the leading ||) > This *should* be correct (let me know please): Thanks Maria! It works splendidly. :) I left it below for others to copy. || program OnArticleListPaint; || const || colDate = 5; //count the columns from left to right starting || //from 0 and write here the number of the column Date || dateFmt = 'dd/mm/yyyy hh:mm'; //or yy (instead of yyyy) for a 2 digits year || function OnArticleListPaint(PaintString:widestring; ColumnIndex:integer):widestring; || || var fmt : String; || begin || if ColumnIndex = colDate then || begin || fmt := dateFmt; || PaintString := FormatDateTime(fmt, StrToDateTime(PaintString)); || result := PaintString; || end; || end; || begin || end.
Re: [Dialog] Date and Time
Author: Julia Thorne
Date: Fri, 11 Jun 2004 06:34
Date: Fri, 11 Jun 2004 06:34
18 lines
1796 bytes
1796 bytes
On Fri, 11 Jun 2004 02:42:24 +0200, Mark Question wrote: > On Thu, 10 Jun 2004 21:43:57 +0100, Thomas Edison wrote: > >> On Thu, 10 Jun 2004 01:45:44 +0100, Thomas Edison wrote: >> >> <snip> >> >> Thanks for the replies. I'll take a look into Dialog scripting when I have >> the time. >> >> Cheers > > Why not just shove the date column (if it's at the right side, as by > default) just a bit more to the right, so the seconds vanish? Because "1:11:12" is a different length than "10:45:33", so the right-hand edges don't align.
Re: [Dialog] Date and Time
Author: /betty/
Date: Fri, 11 Jun 2004 07:48
Date: Fri, 11 Jun 2004 07:48
19 lines
2189 bytes
2189 bytes
On Fri, 11 Jun 2004 06:34:16 GMT, Julia Thorne used 18 lines in response: > On Fri, 11 Jun 2004 02:42:24 +0200, Mark Question wrote: > >> Why not just shove the date column (if it's at the right side, as by >> default) just a bit more to the right, so the seconds vanish? > > Because "1:11:12" is a different length than "10:45:33", so the > right-hand edges don't align. If for some queer reason anyone wasn't using a leading zeros format for their datetime string they could set right alignment in Dialog's columns editor to strip the seconds like Mark suggested. Default is left align for that column. -- /betty/ [2004-06-11 17:31:27]
Re: [Dialog] Date and Time
Author: Julia Thorne
Date: Fri, 11 Jun 2004 20:55
Date: Fri, 11 Jun 2004 20:55
20 lines
2171 bytes
2171 bytes
/betty/ wrote: > Julia Thorne wrote: >> Mark Question wrote: >> >>> Why not just shove the date column (if it's at the right side, as by >>> default) just a bit more to the right, so the seconds vanish? >> >> Because "1:11:12" is a different length than "10:45:33", so the >> right-hand edges don't align. > > If for some queer reason anyone wasn't using a leading zeros format for > their datetime string they could set right alignment in Dialog's columns > editor to strip the seconds like Mark suggested. I don't have a queer reason, just a plain ordinary reason: There is no option for leading 0s in the date/time column. I wanted leading zeros, but there is no such option. If there was a format option for the string in the time column, it wouldn't be necessary to use a script to suppress the display of seconds, as the OP wanted.
Re: [Dialog] Date and Time
Author: Mark Question
Date: Sat, 12 Jun 2004 03:09
Date: Sat, 12 Jun 2004 03:09
28 lines
2437 bytes
2437 bytes
On Fri, 11 Jun 2004 20:55:24 GMT, Julia Thorne wrote: > /betty/ wrote: >> Julia Thorne wrote: >>> Mark Question wrote: >>> >>>> Why not just shove the date column (if it's at the right side, as by >>>> default) just a bit more to the right, so the seconds vanish? >>> >>> Because "1:11:12" is a different length than "10:45:33", so the >>> right-hand edges don't align. >> >> If for some queer reason anyone wasn't using a leading zeros format for >> their datetime string they could set right alignment in Dialog's columns >> editor to strip the seconds like Mark suggested. > > I don't have a queer reason, just a plain ordinary reason: > There is no option for leading 0s in the date/time column. I wanted > leading zeros, but there is no such option. If there was a format > option for the string in the time column, it wouldn't be necessary to > use a script to suppress the display of seconds, as the OP wanted. This is weird, the leading zeros are the default setting (at least with me). Maybe push the "Revert to default layout" button in the columns editor. Just found, if the default left alignment is changed, you cannot hide the seconds, but the figures starting from the left, i.e. the days.
Re: [Dialog] Date and Time
Author: Julia Thorne
Date: Sat, 12 Jun 2004 04:43
Date: Sat, 12 Jun 2004 04:43
42 lines
3335 bytes
3335 bytes
On Sat, 12 Jun 2004 05:09:08 +0200, Mark Question wrote: > On Fri, 11 Jun 2004 20:55:24 GMT, Julia Thorne wrote: > >> /betty/ wrote: >>> Julia Thorne wrote: >>>> Mark Question wrote: >>>> >>>>> Why not just shove the date column (if it's at the right side, as by >>>>> default) just a bit more to the right, so the seconds vanish? >>>> >>>> Because "1:11:12" is a different length than "10:45:33", so the >>>> right-hand edges don't align. >>> >>> If for some queer reason anyone wasn't using a leading zeros format for >>> their datetime string they could set right alignment in Dialog's columns >>> editor to strip the seconds like Mark suggested. >> >> I don't have a queer reason, just a plain ordinary reason: >> There is no option for leading 0s in the date/time column. I wanted >> leading zeros, but there is no such option. If there was a format >> option for the string in the time column, it wouldn't be necessary >> to use a script to suppress the display of seconds, as the OP wanted. > > > This is weird, the leading zeros are the default setting (at least > with me). Maybe push the "Revert to default layout" button in the > columns editor. This IS weird. Dialog never had leading zeros on my system, and there is nothing in the menus or the Help that I can find, that gives any hint of how to change it. Maybe it's something to do with the Windows codepage setting, rather than Dialog configuration. > Just found, if the default left alignment is changed, you cannot hide > the seconds, but the figures starting from the left, i.e. the days. Right alignment wouldn't help at all, since not only the Time but the Date has a variable length. No leading zeros! The time/date string can be "1/1/04 1:1:01" to "12/31/04 12:59:59", a difference of 4 characters. Since the time changes more often than the date, the column is most readable when left justified. IMHO.
Re: [Dialog] Date and Time
Author: foxidrive
Date: Sat, 12 Jun 2004 06:02
Date: Sat, 12 Jun 2004 06:02
9 lines
1847 bytes
1847 bytes
On Sat, 12 Jun 2004 04:43:01 GMT, Julia Thorne wrote: > This IS weird. Dialog never had leading zeros on my system, and there > is nothing in the menus or the Help that I can find, that gives any > hint of how to change it. Maybe it's something to do with the > Windows codepage setting, rather than Dialog configuration. Nods. In XP you'll find in in Control Panel>Regional settings>Customise and then time/date.
Re: [Dialog] Date and Time
Author: Rom
Date: Sat, 12 Jun 2004 06:46
Date: Sat, 12 Jun 2004 06:46
29 lines
2388 bytes
2388 bytes
On Fri, 11 Jun 2004 20:55:24 GMT, Julia Thorne rambled: > /betty/ wrote: > > Julia Thorne wrote: > >> Mark Question wrote: > >> > >>> Why not just shove the date column (if it's at the right side, as by > >>> default) just a bit more to the right, so the seconds vanish? > >> > >> Because "1:11:12" is a different length than "10:45:33", so the > >> right-hand edges don't align. > > > > If for some queer reason anyone wasn't using a leading zeros format for > > their datetime string they could set right alignment in Dialog's columns > > editor to strip the seconds like Mark suggested. > > I don't have a queer reason, just a plain ordinary reason: > There is no option for leading 0s in the date/time column. I wanted > leading zeros, but there is no such option. Not in Dialog, but if your system's Regional Options 'Time format' is set to display hours as "hh" (12 hour clock) the leading zero displays in Dialog, and if the 'Short date format' is set to display the days/months as "dd/MM" or "MM/dd" the leading zeros displays. Switching groups or minimising Dialog many be necessary for the change to display. -- Rom
Re: [Dialog] Date and Time
Author: /betty/
Date: Sat, 12 Jun 2004 07:49
Date: Sat, 12 Jun 2004 07:49
44 lines
3435 bytes
3435 bytes
On Fri, 11 Jun 2004 20:55:24 GMT, Julia Thorne used 20 lines in
response:
> /betty/ wrote:
>> Julia Thorne wrote:
>>> Because "1:11:12" is a different length than "10:45:33", so the
>>> right-hand edges don't align.
>>
>> If for some queer reason anyone wasn't using a leading zeros format for
>> their datetime string they could set right alignment in Dialog's columns
>> editor to strip the seconds like Mark suggested.
>
> I don't have a queer reason, just a plain ordinary reason:
> There is no option for leading 0s in the date/time column. I wanted
> leading zeros, but there is no such option. If there was a format
^^^^^^^^^^^^^^??
See below. As I referred earlier in this thread; the default datetime,
esp time component format, is dependant on your global System setting.
> option for the string in the time column,
Control Panel
Regional options (or eqv name/place per your Win version)
Time [tab]
Choose your weapon there.
>it wouldn't be necessary to
> use a script to suppress the display of seconds, as the OP wanted.
And indeed there is no necessity. As someone else pointed out (provided
using Date as rightmost column), and optionally using right aligned
format in the column editor, it can easily be slid right to cover the
seconds component on the string.
As in so many cases scripting is often resorted to as the "sledgehammer
to crack a walnut" "have to use it because it's there" panacea.
It shouldn't be, everything has its place.
--
/betty - Use sparingly, if pain persists seek advice from your doctor/
[2004-06-12 17:26:36]
Re: [Dialog] Date and Time
Author: Mark Question
Date: Sat, 12 Jun 2004 11:49
Date: Sat, 12 Jun 2004 11:49
27 lines
2509 bytes
2509 bytes
On Sat, 12 Jun 2004 17:49:25 +1000, /betty/ wrote: > And indeed there is no necessity. As someone else pointed out (provided > using Date as rightmost column), and optionally using right aligned > format in the column editor, it can easily be slid right to cover the > seconds component on the string. > > As in so many cases scripting is often resorted to as the "sledgehammer > to crack a walnut" "have to use it because it's there" panacea. > > It shouldn't be, everything has its place. Slight correction /betty/. Tested it and found this: the column itself does not have to be on the utmost right, because the column will always get lenghtened or shortened at its right end (regardless of the columns position in the window), as long as the default "left alignment" is used. If you change the default "left alignment" either to right or centre alignment, the behaviour of the column changes and will get shortened or lengthened at its left side (close to the days), or both sides. Also found, if you revert again to the default "left alignment", the column will *keep* its new behaviour (of getting shortened at the left or both sides) unless you really push the "Revert to default layout" button. At least, that's how Dialog behaves here.
Re: [Dialog] Date and Time
Author: /betty/
Date: Sat, 12 Jun 2004 12:23
Date: Sat, 12 Jun 2004 12:23
57 lines
4149 bytes
4149 bytes
On Sat, 12 Jun 2004 13:49:36 +0200, Mark Question used 27 lines in response: > On Sat, 12 Jun 2004 17:49:25 +1000, /betty/ wrote: > >> And indeed there is no necessity. As someone else pointed out (provided >> using Date as rightmost column), and optionally using right aligned >> format in the column editor, it can easily be slid right to cover the >> seconds component on the string. >> >> As in so many cases scripting is often resorted to as the "sledgehammer >> to crack a walnut" "have to use it because it's there" panacea. >> >> It shouldn't be, everything has its place. > > Slight correction /betty/. Tested it and found this: > > the column itself does not have to be on the utmost right, because the > column will always get lenghtened or shortened at its right end > (regardless of the columns position in the window), as long as the default > "left alignment" is used. > Ah yes of course! Thank you for the correction Mark. :-) This thread's encouraged a diversity of constructive alternatives. > If you change the default "left alignment" either to right or centre > alignment, the behaviour of the column changes and will get shortened or > lengthened at its left side (close to the days), or both sides. > True too. I only proposed right align as a possible for those who insist on using non-leading zero formats, and/or (in some cases) the effect of using weirdo proportional display typefaces. > Also found, if you revert again to the default "left alignment", the column > will *keep* its new behaviour (of getting shortened at the left or both > sides) unless you really push the "Revert to default layout" button. At > least, that's how Dialog behaves here. That's an interesting observation. Ta. I'll try it. Unrelated and Fwiw; I deploy another workaround for cases where right align is preferable, except Dialog doesn't nicely come to the party: By adding 1 or 2 'false' space chars [Alt_0160] to the variable, eg. "%datelocal% ", or to "%newservercount% " in the subbed groups list, it permits a few pixels separation from right margins of a column display or against scroll bars -- makes for easier readability. Hopefully one day Marcus might give us poor sight impaired plebs those few pixels separation in the default R-align state. Something equivalent to the Left, which for some reason seems to be OK. -- /betty/ [2004-06-12 21:53:27]
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