[fpc-pascal] Re: Possible bug in return value of MonthsBetween function in unit dateutils

Funky Beast funkybeast at pacific.net.sg
Thu Dec 10 13:42:38 CET 2009


Marco van de Voort wrote:
> In our previous episode, Henry Vermaak said:
>> 2009/12/10 Funky Beast <funkybeast-s7p20SfEDVbhUPcrv1QwXQ at public.gmane.org>:
>>> I did read that, but I'm just wondering isn't 9.98767967 more approximate to 10 than 9?
>> How do you round a month?  It makes sense that the function only gives
>> full months, imo.  Either way, I think this is d?lphi compatible and
>> at least documented.
> 
> Yes. Keep in mind that you wouldn't want 16 days difference being rounded up
> to a full month.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal-PD4FTy7X32k2wBtHl531yWD2FQJk+8+b at public.gmane.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 

HeHe.....

But I loose 29 days from the above when it yields 9 instead of 10.
Anyway, its just my precision engineering habits kicking in.
I was just consolidating our average production output from the
above 2 dates and the numbers looks funny (and too positive to be true).


Regards,
Funky Beast



More information about the fpc-pascal mailing list