Joda-Time has no solution for this problem. That is partly because of
the difficulty in defining the rules as you explain yourself.

Stephen

2008/11/24 James Richardson <[EMAIL PROTECTED]>:
>
> Hi,
>
> If i want to calculate, say, simple interest, then I need the number of
> years that the principal has been held, generally as a fractional number.
>
> How can I get Joda Time to give me this fractional number?
>
> Days.daysBetween(x,y) - gives number of days, but cnoverting this to real
> years is different.
>
> Years.yearsBetween(x,y) - gives only whole years.
>
> new Period(x,y) - not sure how this helps me here...
>
> Also, years with leap years would seem to complicate any "naive" solution.
>
> I'm sure this gets done a lot, so any help much appreciated.
>
>
> Thanks!
>
> James
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to