Be aware that new DateTime(null) results in "now". (go figure..)
So you may want to check the parameter 'Date start' for null.
Ronny
On Dec 19, 2008, at 5:58 PM, Miguel wrote:
Something you can allways do, is to define a parallel set of
getter/setter in your bean with type java.util.Date that
Those will need NPE checks by the way.
:)
-bp
On Dec 19, 2008, at 9:58 AM, Miguel wrote:
Something you can allways do, is to define a parallel set of
getter/setter in your bean with type java.util.Date that internally
does the conversion.
public Date getStartDate() {
Something you can allways do, is to define a parallel set of
getter/setter in your bean with type java.util.Date that internally
does the conversion.
public Date getStartDate() {
return start.toDate();
}
public void setStartDate(Date start) {
Date is pretty much deprecated except for a way to carry a long
primitive around because of the TZ and conversions it lacks. It fails
in some cases and most of the core API on Date is deprecated. Most
folks should be using Calendar for date and time correctness if they
don't want to use Jod
On Tuesday 16 December 2008 23:49:51 Dave Newton wrote:
> --- On Tue, 12/16/08, Andreas Joseph Krogh wrote:
> > Anyone else needing this, or am I in some kind of
> > joda-cult here in Norway?
>
> I've used it, but all the places I've consulted at use java.util.Date. Yours
> is the first request
I use yoda time, also with Hibernate.
Once I found a patch (don't remember where), but as far as i have used
it, i think it works.
package funala.web.typeconverter;
public class Iso8601DateTypeConverter extends StrutsTypeConverter {...}
Try it, It does what it is supposed to do (reading the code)
--- On Tue, 12/16/08, Andreas Joseph Krogh wrote:
> Anyone else needing this, or am I in some kind of
> joda-cult here in Norway?
I've used it, but all the places I've consulted at use java.util.Date. Yours is
the first request for it that I know of, and I follow the user group fairly
closely.
On Tuesday 16 December 2008 23:36:50 Musachy Barroso wrote:
> > Previously I've created container-objects to wrap joda-classes, which works
> > but shouldn't be necessary. I kind of hoped that Struts-2 in its most
> > modern form (trunk) included converters for the most common object-types. I
>
> He he, we know different people it seems:-) Anyway, it's not like the API of
> joda-time changes very often, so I assume it's practically a one-timer. But,
> I see that this doesn't ich very much, obviously, among the core-developers,
> and hence doesn't get scratched.
>
use the force you mus
On Tuesday 16 December 2008 23:30:59 Martin Cooper wrote:
> On Tue, Dec 16, 2008 at 2:23 PM, Andreas Joseph Krogh
> wrote:
>
> > On Tuesday 16 December 2008 23:14:50 Musachy Barroso wrote:
> > > It doesn't mean that it will convert from string to a joda object, it
> > > means that it will convert
> Previously I've created container-objects to wrap joda-classes, which works
> but shouldn't be necessary. I kind of hoped that Struts-2 in its most modern
> form (trunk) included converters for the most common object-types. I think,
> for what it's worth, the ticket is missleading and that it
On Tue, Dec 16, 2008 at 2:23 PM, Andreas Joseph Krogh
wrote:
> On Tuesday 16 December 2008 23:14:50 Musachy Barroso wrote:
> > It doesn't mean that it will convert from string to a joda object, it
> > means that it will convert a string in ISO 8601 format, to a Date
> > object. The patch in that t
On Tuesday 16 December 2008 23:14:50 Musachy Barroso wrote:
> It doesn't mean that it will convert from string to a joda object, it
> means that it will convert a string in ISO 8601 format, to a Date
> object. The patch in that ticket used joda lib to create the ISO 8601,
> if I don't remember wron
It doesn't mean that it will convert from string to a joda object, it
means that it will convert a string in ISO 8601 format, to a Date
object. The patch in that ticket used joda lib to create the ISO 8601,
if I don't remember wrong.
musachy
On Tue, Dec 16, 2008 at 5:09 PM, Andreas Joseph Krogh
14 matches
Mail list logo