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 Joda and stick with the JDK classes. Calendar however is very clunky and mutable. Therefore, most people I know that need to internationalize or localize use Joda because it is correct, simple and immutable. Also, something very similar to the Joda date/ time API is probably going to be in Java 8.0 or something like that via JSR 310, unless it gets squashed or no one pushes it forward. Even still, Joda is the benchmark these days for a date/time API.

-bp

On Dec 16, 2008, at 3:30 PM, Martin Cooper wrote:

On Tue, Dec 16, 2008 at 2:23 PM, Andreas Joseph Krogh
<andr...@officenet.no>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 ticket used joda lib to create the ISO 8601,
if I don't remember wrong.

Ok, so you're saying that Struts2 (even in trunk) is unable to handle
joda-time dates out of the box? That's a pitty. In 2008, is anyone actually
using pure java.util.Date anymore?


I was wondering the opposite - are enough people using Joda Time to make it worth the support / time / energy in S2? Everyone I know is, in fact, using
java.util.Date.

--
Martin Cooper





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 should be
commented somewhere that Struts-2.1 will not support joda-time.

I know this sounds kind of rant-ish, but there are so many good things about Struts2 that missing out-of-the-box joda-support is kind of hard to
swallow...

--
Andreas Joseph Krogh <andr...@officenet.no>
Senior Software Developer / CEO
------------------------ +---------------------------------------------+ OfficeNet AS | The most difficult thing in the world is to | Karenslyst Allé 11 | know how to do a thing and to watch | PO. Box 529 Skøyen | somebody else doing it wrong, without | 0214 Oslo | comment. | NORWAY | | Tlf: +47 24 15 38 90 | | Fax: +47 24 15 38 91 | | Mobile: +47 909 56 963 | | ------------------------ +---------------------------------------------+

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to