--- On Fri, 3/26/10, Adam Heath <doo...@brainfood.com> wrote: > Adrian Crum wrote: > > --- On Fri, 3/26/10, Adam Heath <doo...@brainfood.com> > wrote: > >> Scott Gray wrote: > >>> On 26/03/2010, at 5:13 PM, Adam Heath wrote: > >>> > >>>> The above method makes use of a > BigDecimal. > >> This is wrong. It should > >>>> be an int. Originally, before the > BigDecimal > >> conversion, it was a > >>>> Double. This method should have > never been > >> converted. > >>> It looked like a good candidate at the time > and > >> looking at it now, it still looks like a good > candidate for > >> BigDecimal. Why should it never have been > converted? > >> > >> Days is a whole number. 2 billion days is > over 5.8 > >> million years. > >> Why would it need to be a Double previously, and > a > >> BigDecimal now? > > > > Not to mention the method performs millisecond > arithmetic - which is a no-no. > > Actually, the entityengine should be made to store an > interval type, > using by any kind of repeat/period/calendar field, and this > new > java-type should not have any type of conversion to raw > numbers.
That is what TimeDuration was intended for.