[fpc-pascal] FormatDatetime is not respecting the specified pattern

Luciano de Souza luchyanus at gmail.com
Wed Feb 1 12:17:46 CET 2012


Oh! Your correction is really good and welcome. Becouse of a Leber 
Congenital Amaurosis, I became blind when I was a child. As a 
consequence, nowadays, for me, slashes and backslashes are only a word 
spoken by the screen reader. It's really curious how brains can work 
differrently.

When people know you are blind, they don't use to make this kind of 
comment. I am lucky becouse you don't know it! Yes, if the shape of 
slashes and backslashes were similar to a triangle or a castle, it 
wouldn't matter for my daily life. In spite of this, it's really 
intersting to know how things exist in the visual world.

Even screen readers are worried in supplying some visual information. 
NVDA, the screen reader I currently use, can speak the RGB code on a 
particular point. Other screen readers can be more: they can also speak 
the name of the color. Some time ago, using this feature, I knew a color 
called "brick". Brick as a color? It's really intersting. Yes, this 
information is not very important in my life, but at the point of view 
of culture, of the visual culture, it's really curious.

For these reasons, I like Pascal intensively. The two first screen 
readers, these technological wonder, I have been using, they are 
developed in Pascal: Dosvox and Virtual Vision, both conceived by 
brazilian developers.

Welll, well, let me stop the message. If I say something more off topic, 
I will be likely talking about planets and galaxes!

Thank you very much!

Regards,

Luciano

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


-- 
Luciano de Souza



More information about the fpc-pascal mailing list