Re: Small addition to PGInterval
От | Kris Jurka |
---|---|
Тема | Re: Small addition to PGInterval |
Дата | |
Msg-id | Pine.BSO.4.64.0704110704480.1156@leary.csoft.net обсуждение исходный текст |
Ответ на | Re: Small addition to PGInterval (Hartmut Benz <hartmut.benz@ti-wmc.nl>) |
Ответы |
Re: Small addition to PGInterval
|
Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: