[Lazarus] DateDif function needed

waldo kitty wkitty42 at windstream.net
Mon Nov 11 13:31:16 CET 2013


On 11/11/2013 3:39 AM, Michael Schnell wrote:
> On 11/08/2013 09:35 PM, John Landmesser wrote:
>
>> Result would be: 0 years, 0 moths, 11 days
> IMHO a date diff in this format us desperately misleading, as the count of days
> in a month varies.

understood but it is what many of us want for tasks of this nature... it means 
that one need know the numbers of days in the months between the dates so they 
can be properly counted... it also means knowing if a leap year is involved at 
some point...

the *Span routines may be able to give us this info since they have fractional 
parts but as the code notes, starting with years or months values will result in 
an estimation...

-- 
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