Hello,

I'm working on parsing date/time values produced by Sybase (which gives very 
limited control over the formatted output of dates).  Two examples of different 
dates provided by it are:
Jan 10 2007 12:00:00:000AM
Jan 10 2007  1:00:00:000AM

I'm parsing with the pattern: MMM d yyyy h:mm:ss:SSSa

While I'm able to successfully parse these dates using a SimpleDateFormat 
pattern into java.util.Date instances, the same pattern using Joda produces an 
IllegalArgumentException on dates that follow the second pattern above or when 
the day value is a single digit (see attached test case).

Apparently, Joda does not interpret "d" and "h" as either one digit or two 
digits while Java does.

I'm given to assume that Joda is consistent with the patterns in 
SimpleDateFormat - am I missing something here?

Thanks for your time.

Ed Bridges



Disclaimer link.  To see it, click the link below, or copy and paste it into 
your browser's address line.
http://www.citco.com/emaildisclaimer.htm

Attachment: DateTimeFormatterTest.java
Description: DateTimeFormatterTest.java

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to