|From:||Kris Jurka <books(at)ejurka(dot)com>|
|To:||Ľubomír Varga <luvar(at)plaintext(dot)sk>|
|Subject:||Re: Possible bug in PGInterval class|
|Views:||Raw Message | Whole Thread | Download mbox|
On Mon, 31 Aug 2009, ?ubom?r Varga wrote:
> I have noticed imho bad behaviour of add methods for PGInterval class.
> First is unlogical adding sum to parameter and not to object on which is
> method invoked. (this is also writen in javadoc, so I accept it)
This is to be similar to the add(Date) and add(Calendar) functions. For
them you wan't to add the interval to the passed object.
> Second, critical for me, is to not using modulo in addition. So if you
> add 55 minutes to 55 minutes, you get 110 minutes instead of 1 hour and
> 50 minutes.
For minutes and hours, it would be OK, but when rolling hours into days or
days into months, context is needed to know if you are near a daylight
saving time change or how many days are in the month. For this reason we
don't manipulate the values and leave them as is.
|Next Message||Oliver Jowett||2009-09-02 00:03:11||Re: Possible bug in PGInterval class|
|Previous Message||Ľubomír Varga||2009-08-31 19:34:12||Possible bug in PGInterval class|