[Lazarus] DateDif function needed
John Landmesser
JohnML at online.de
Mon Nov 11 16:46:43 CET 2013
That's what i realized until now::
Quote of lhelp:
"MonthsBetween returns the number of whole months between ANow and
AThen. This number is an approximation, based on an average number of
days of 30.4375
per month (average over 4 years). This means the fractional part of a
month is dropped."
MonthsBetween('01.01.2000', '01.03.2000') = 1(!!)
This wrong(!!) result is according to the explanation in the lhelp file,
but this function is useless if you have leapyears in your period.
Fazit:
You can't write a DateDif function with the functions in DateUtils.pas ?!!
Giving up and using the Jedi DateDif function.
More information about the Lazarus
mailing list