[fpc-devel]DateSeparator

Tony Maro tony at maro.net
Sun Aug 8 01:45:57 CEST 2004


The DateSeparator is defined in sysinth.inc as

Const

   { Character to be put between date, month and year }
   DateSeparator: char = '-';

   { Format used for short date notation }
   ShortDateFormat: string = 'd/m/y';

   { Format used for long date notation }
   LongDateFormat: string = 'dd" "mmmm" "yyyy';

Which means if I try to display something in the "standard" American 
format of mm/dd/yyy using:

FormatDate('mm/dd/yyyy',mydate)

I end up with "mm-dd-yyyy".  The / gets replaced with the DateSeparator 
constant.  Since it's an FPC constant, I can't easily change this. 

Basically, this makes every date format function useless for me.

I see a note above it that says use InitInternational to set this, but 
that procedure seems to do nothing of the sort.

Can we not change all the defines in sysinth.inc to VAR instead of CONST 
so they could be manipulated by the programmer?

-Tony Maro




More information about the fpc-devel mailing list