On Wed, 11 Apr 2007, Hartmut Benz wrote:
> Thanks for pointing this out. I corrected the bug (months) and use the server
> definition for both year and month. It is a bit problematic to determine the
> 'correct' number of seconds in these kind of intervals because there are so
> many of them :-)
Does getLengthInMillis have any external value or is it solely useful for
implementing compareTo? I fear that people will try to do something like:
Date d = new Date();
PGInterval i = new PGInterval("1 year");
d.setTime(d.getTime() + i.getLengthInMillis());
instead of using the exising i.add(d) method. As you mention it's not
entirely clear what value it should be returning, so I'd prefer not to
expose it unless you have a more useful use case.
Kris Jurka