At 12:56 PM 9/2/2003, you wrote:
Steve Cohen wrote:
Hmm, that's weaker than I would have expected. If I'd like something a little better, is your recommendation then to add to DateUtils?

I guess it is time for a date type. I imagine taking java.util.Calendar as a param would be a nice way to map it (or Date, though that one's lack of timezones is an eternal source of trouble in the SOAP world)

SOAP and everywhere an application may span timezones.

This sounds like the first step down a very slippery slope of processing arbitrary date formats. I don't believe that the date parsing is consistent across ant tasks now, and tasks like CVSTAGDIFF don't parse their date parameters at all, but pass them through to the underlying app.

As date formats are different across locales, and date strings can be very ambiguous (MM-DD-YYYY vs DD-MM-YYYY for example will both "match" the input string '12-12-2000' and there is no way to "dis-ambiguate" them without some other input.

This is a sore point with me because for the mess in the system I'm working with now -- there are a list of US specific formats that are each tried against the input string until one matches. This was originally coded as the nested exception handler from hell...

Anyway, I'd suggest be very cautious about introducing general date processing in ant that would allow arbitrary date formats, as opposed to one or two formats per locale, or a single ISO style format "yyyy-MM-ddTHH:mm:ss.SSS" (I think that one is legal, I don't have the spec in front of me).

Ken


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to