Thread View: news.software.readers
4 messages
4 total messages
Started by bill
Sat, 15 May 2021 04:43
Dialog global variables "ShortTimeFormat" & "LongTimeFormat" & TZ based on Date or Injection-Date?
Author: bill
Date: Sat, 15 May 2021 04:43
Date: Sat, 15 May 2021 04:43
39 lines
2179 bytes
2179 bytes
Dialog: Help > Help Contents > Reference > Date-Time Format Strings talks about global variables but I can't find _where_ they are defined! Some of the global variables are obvious as to what they must be: ShortDayNames global variable LongDayNames global variable ShortMonthNames global variable LongMonthNames global variable TimeAMString global variable TimePMString global variable DateSeparator global variable TimeSeparator global variable But others I'm not so sure what the global variable is set to: ShortDateFormat global variable LongDateFormat global variable ShortTimeFormat global variable LongTimeFormat global variable So how do you know what they are (and how would I change them)? (I'm having problems getting the date & timezone offset the way I like.) On 2021-05-14 01:02:03 +0400, foo bar wrote: If I set Dialog attribution "followup" & "date format" to this: On %date%, %full-name% wrote:\n yyyy"-"mm"-"dd hh:nn:ss I get this which is close to what I want but where's the tz offset? On 2021-05-14 01:02:03, foo bar wrote: All I want is to figure out how to add the timezone offset. (and is that tz offset the offset from the "Date" or "Injection-Date"?) -- Have you read the article about broken pencils? I hope not, the reviewers said it's pointless and lead on for too long.
Re: Dialog global variables "ShortTimeFormat" & "LongTimeFormat" & TZ based on Date or Injection-Date?
Author: bill
Date: Sat, 15 May 2021 05:17
Date: Sat, 15 May 2021 05:17
43 lines
2506 bytes
2506 bytes
On Sat, 15 May 2021 06:43:57 +0200, bill wrote: > (I'm having problems getting the date & timezone offset the way I like.) > On 2021-05-14 01:02:03 +0400, foo bar wrote: I figured out how to know what the ShortDateFormat is set to by using ddddd Which shows in the attribution a ShortDateFormat of On 5/14/2021, foo bar wrote: Adding one more "d" character seems to identify the LongDateFormat dddddd Which shows in the attribution a LongDateFormat of On Friday, May 14, 2021, foo bar wrote: Likewise the character "t" seems to identify the ShortTimeFormat variable t Which shows in the attribution a ShortTimeFormat of On 1:02 AM, foo bar wrote: Adding one more "t" character seems to identify the LongTimeFormat tt Which shows in the attribution a LongTimeFormat of On 1:02:03 AM, foo bar wrote: None of which added the time zone offset which was what I am looking for. On 2021-05-14 01:02:03 +0400, foo bar wrote: So that global variable wasn't the secret to adding the tz offset. Of course I can use "idt" (or |idt|) to add a timezone offset |idt| Which shows in the attribution an offset but with a different date format On Fri, 14 May 2021 01:03:03 +0400, foo bar wrote: From the date format that I want, which is On 2021-05-14 01:02:03 +0400, foo bar wrote: Do you know how to add the timezone offset to the attribution? On 2021-05-14 01:02:03 +0400, foo bar wrote: And will that offset be based on the Date: or the Injected-Date: header? -- I've been using up the ink in all the pens and all the lead in our pencils. Makes my wife's Christmas wish list much shorter.
Re: Dialog global variables "ShortTimeFormat" & "LongTimeFormat" & TZ based on Date or Injection-Date?
Author: Bernd Rose
Date: Sat, 15 May 2021 06:00
Date: Sat, 15 May 2021 06:00
28 lines
2109 bytes
2109 bytes
On Sat, 15th May 2021 07:17:34 +0200, bill wrote: > On Sat, 15 May 2021 06:43:57 +0200, bill wrote: > >> (I'm having problems getting the date & timezone offset the way I like.) >> On 2021-05-14 01:02:03 +0400, foo bar wrote: [...] > Of course I can use "idt" (or |idt|) to add a timezone offset > |idt| > Which shows in the attribution an offset but with a different date format > On Fri, 14 May 2021 01:03:03 +0400, foo bar wrote: > From the date format that I want, which is > On 2021-05-14 01:02:03 +0400, foo bar wrote: > > Do you know how to add the timezone offset to the attribution? > On 2021-05-14 01:02:03 +0400, foo bar wrote: > And will that offset be based on the Date: or the Injected-Date: header? The idt format is the only one supporting timezone offset. It obviously has a special handler attached in the 40tude Dialog source code. All other formats follow the standard Delphi FormatDateTime function: www.delphibasics.co.uk/RTL.asp?Name=FormatDateTime What you have in mind can, IMHO, not be done with the "Attribution lines" date/time format settings. Bernd
Re: Dialog global variables "ShortTimeFormat" & "LongTimeFormat" & TZ based on Date or Injection-Date?
Author: bill
Date: Sat, 15 May 2021 06:55
Date: Sat, 15 May 2021 06:55
42 lines
2408 bytes
2408 bytes
On Sat, 15 May 2021 08:00:34 +0200, Bernd Rose wrote: > The idt format is the only one supporting timezone offset. It obviously > has a special handler attached in the 40tude Dialog source code. That explains what I was seeing. Thanks. No wonder I wasn't able to get it the way I had wanted it to be. BTW, the help lists "idt" but by default I see "|idt|" in the "Date Format" but when I test it out, they do the same thing (with or without the pipes). Any idea why Dialog defaults to surrounding "Date Format" idt with pipes? > All other formats follow the standard Delphi FormatDateTime function: > www.delphibasics.co.uk/RTL.asp?Name=FormatDateTime Wow. That's nice. It explains what every variable turns out to be! DateSeparator = / TimeSeparator = : ShortDateFormat = dd/mm/yyyy LongDateFormat = dd mmm yyyy TimeAMString = AM TimePMString = PM ShortTimeFormat = hh:mm LongTimeFormat = hh:mm:ss ShortMonthNames = Jan Feb ... LongMonthNames = January, February ... ShortDayNames = Sun, Mon ... LongDayNames = Sunday, Monday ... TwoDigitYearCenturyWindow = 50 http://www.delphibasics.co.uk/RTL.asp?Name=FormatDateTime > What you have in mind can, IMHO, not be done with the "Attribution lines" > date/time format settings. Well. That's it then. I'll leave it the way it is. Thanks! -- Have you read the article about broken pencils? I hope not, the reviewers said it's pointless and lead on for too long.
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