I've just finished work on the latest version of eyebol, my
source code analyzer (www.pascalanalyzer.com). As a
way of testing it (and a shameless way of plugging it) I
run it on my favorite open source programs and publish
any bugs it finds. Here's 20 occurrences of a common
mistake it found in Visual PlanIt.
Can you spot what's wrong with this line ?
DayStr:=FormatDateTime('hh:mm AM/PM',Now);
There are 20 places in PlanIt where this sort of mistake
is made. Know what's wrong with it yet ?
The mm in a FormatDateTime signifies month, not
minute even though it is very natural to type h:mm. The
letter n signifies minute so it should read h:nn. The files
in happens in are : VpClock.pas, VpEventRpt.pas,
VpEvntEditDlg, VpMonthView.pas and VpWeekView.pas
A quick search for 'h:mm' and replacing it with 'h:nn'
would fix it. Or you could purchase eyebol
(www.pascalanalyzer.com) and it will automatically
apply all the changes for you :)
Thanks
Michael
Logged In: NO
From Delphi Help file:
mm Displays the month as a number with a leading zero
(01-12). If the mm specifier immediately follows an h or hh
specifier, the minute rather than the month is displayed.
So it works this way