[fpc-pascal] FormatDatetime is not respecting the specified pattern
Luciano de Souza
luchyanus at gmail.com
Wed Feb 1 12:38:14 CET 2012
Oh! Very well! I am blind, for me, slashes and backslashes are only
words spoken by the screen reader. The worst is I listen "barra" and
"barra invertida", the portuguese correspondent words. You can imagine:
I don't see slashes and I listen differently. The chance of mistake is
very high! But fortunately, I have a good friend who corrects me! One
bilion of corrections else and I will be perfect!
Thank you very much!
Em 01-02-2012 04:54, waldo kitty escreveu:
> On 1/31/2012 22:23, Luciano de Souza wrote:
>> Hello listers,
>>
>> A strange error came up when formating a date. See this code:
>> writeln(formatdatetime('dd/mm/YYYY', now));
>> The answer should be: 31/01/2012
>> The answer was: 31-01-2012
>> I did one test else:
>> writeln(formatdatetime('dd$mm$YYYY', now));
>> The answer was: 31$01$2012
>> Yes, the problem seems to be related to the backslash.
>
> errrm1... that's not a 'back slash'... that's a "forward" slash.. aka
> just a plain slash... "back slash" leans backwards (ie: top to the
> left)...
>
>> DefaultFormatSettings.DateSeparator := '/';
>> writeln(formatdatetime('dd/mm/YYYY', now));
>> The answer was: 31/01/2012
>> Right! That's the answer. But it was necessary to setup the settings
>> manually.
>> The test was done with Freepascal 2.4.4
>
> errrm2: FP 2.6.0 is the current release... unless i'm highly
> mistaken... but still, see higher above ;)
>
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list