Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-04

The format of LongDateFormat?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys
By default under Linux, the LongDateFormat is defined in SysUtils as
follows:  LongDateFormat: 'dd" "mmmm" "yyyy';

Must there be double quotes in the string? If so, what purpose do they serve? I've tried with or without the double quotes and the output is exactly the same on my Linux system.

dd" "mmmm" "yyyy = 22 April 2008
dd mmmm yyyy = 22 April 2008

Regards,
- Graeme -

_______________________________________________________ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 10 lines
By default under Linux, the LongDateFormat is defined in SysUtils as follows: LongDateFormat: 'dd" "mmmm" "yyyy'; Must there be double quotes in the string? If so, what purpose do they serve? I've tried with or without the double quotes and the output is exactly the same on my Linux system. dd" "mmmm" "yyyy = 22 April 2008 dd mmmm yyyy = 22 April 2008

The quotes are just a safety measure; In this particular case, they serve no purpose. But in general, so substitution is performed on parts that are in double quotes.

Michael.

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote 17 lines
On Tue, 22 Apr 2008, Graeme Geldenhuys wrote: > By default under Linux, the LongDateFormat is defined in SysUtils as follows: > LongDateFormat: 'dd" "mmmm" "yyyy'; > > Must there be double quotes in the string? If so, what purpose do they serve? > I've tried with or without the double quotes and the output is exactly the > same on my Linux system. > > > dd" "mmmm" "yyyy = 22 April 2008 > dd mmmm yyyy = 22 April 2008 The quotes are just a safety measure; In this particular case, they serve no purpose. But in general, so substitution is performed on parts that are in double quotes.

OK thanks. The reason I ask, is because I define the Lond Date Format in a resourcestring constant. Translating that to a .PO file I end up with the following.... It works, but just doesn't look so nice. :)

#: gfx_constants:rslongdateformat
msgid "dd\" \"mmmm\" \"yyyy"
msgstr ""

Regards,
- Graeme -

_______________________________________________________ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/