[Lazarus] DateDif function needed

J├╝rgen Hestermann juergen.hestermann at gmx.de
Sat Nov 9 18:59:29 CET 2013


Am 2013-11-09 18:42, schrieb waldo kitty:
 > Result:=Trunc(((Abs(MyDateTimeDiff(ANow,AThen))+TDateTimeEpsilon)/ApproxDaysPerYear)+0.5);
 > end;

I thought that correct results should be calculated, not only "approximate" values.
What is "ApproxDaysPerYear"?
A leap year has 266 days and others 365 and this should be considered.
Calculations based on floats seem not very reliable.





More information about the Lazarus mailing list