[Lazarus] DateDif function needed

J├╝rgen Hestermann juergen.hestermann at gmx.de
Tue Nov 12 07:17:01 CET 2013

Am 2013-11-11 17:25, schrieb Michael Van Canneyt:
 > The number of elapsed DAYS between these 2 dates is 60.
 > If the average number of days per month is assumed to be 30.4375, then 2 full months would be 60.875 days.
 > That means that 60 days DOES NOT span 2 full months of 30.4375 days: it falls 0.875 days short for that.
 > Hence, the *intended* result is 1.

But dates from the 1st of a month to the 1st of the next month
should be considered to span a full month, shouldn't it?
If not, of what use would it be?
A month is *not* defined to be 30.4375 days.
Getting an average months is completely useless IMO.
Who wants to get such a result for what purpose?

 > Given their definition they are correct.
 > So please stop saying that they are wrong. You just don't understand their intended use correctly.

Then it seems that he meens that the *definition* is wrong and useless.

More information about the Lazarus mailing list