<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/11/12 Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">
<br>
On Tue, 12 Nov 2013, Jürgen Hestermann wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 2013-11-11 17:25, schrieb Michael Van Canneyt:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The number of elapsed DAYS between these 2 dates is 60.<br>
If the average number of days per month is assumed to be 30.4375, then 2 <br>
</blockquote>
full months would be 60.875 days.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That means that 60 days DOES NOT span 2 full months of 30.4375 days: it <br>
</blockquote>
falls 0.875 days short for that.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hence, the *intended* result is 1.<br>
</blockquote>
<br>
But dates from the 1st of a month to the 1st of the next month<br>
should be considered to span a full month, shouldn't it?<br>
If not, of what use would it be?<br>
A month is *not* defined to be 30.4375 days.<br>
Getting an average months is completely useless IMO.<br>
Who wants to get such a result for what purpose?<br>
</blockquote>
<br></div>
Like I said: you can argue whether the functions are useful.<br>
They are there for Delphi compatibility.<br>
<br>
Feel free to provide other functions, I will happily accept them.<span class="HOEnZb"></span><br></blockquote></div><br></div><div class="gmail_extra">If I am not mistaken, Bart just provided one :-) I suggest using another more discriminant name instead of DateDiff, something like AgeBetween or ExactDateDiff.<br clear="all">

</div><div class="gmail_extra"><br>-- <br>Frederic Da Vitoria<br>(davitof)<br><br>Membre de l'April - « promouvoir et défendre le logiciel libre » - <a href="http://www.april.org" target="_blank">http://www.april.org</a><br>


</div></div>