[Lazarus] DateDif function needed

waldo kitty wkitty42 at windstream.net
Sat Nov 16 18:52:07 CET 2013


On 11/16/2013 12:27 PM, Reinier Olislagers wrote:
> On 16/11/2013 18:21, Michael Van Canneyt wrote:
>> On Fri, 15 Nov 2013, Bart wrote:
>>> The fun part for me is the fact that a seemingly simple question,
>>> where at first glance you would think "I'll just implement that", can
>>> lead to so many "problems".
>>
>> I added a modified version of your implementation to the DateUtils unit as:
>>
>> Procedure PeriodBetween(Const ANow, AThen: TDateTime; Out Years, months,
>> days : Word);
>>
>> I chose this name because it is more in line with the existing
>> XXXBetween functions.
>>
>> I did change the algorithm so it does not do the correction for february
>> of the leap year.
>> It returns now the same results as the Jedi function. (which I didn't
>> take for license reasons)
>>
>> Thanks for providing an implementation.

i have not received Michael's post quoted above... was it posted to the list or 
only in private to a few individuals?

-- 
NOTE: No off-list assistance is given without prior approval.
       Please keep mailing list traffic on the list unless
       private contact is specifically requested and granted.




More information about the Lazarus mailing list