On 14/02/07, bart zagers <[EMAIL PROTECTED]> wrote: > I found a difference between the behaviour of the SimpleDateFormat and > DateTimeFormatter. > I wanted to parse date strings of the following format: > Feb 12 2007 (1 space between Feb and 12) > Feb 9 2007 (2 spaces between Feb and 9) > > If I use the string "MMM d yyyy" (1 space between M and d), both date > strings parse fine using the SimpleDateFormat, but the second one fails > using DateTimeFormatter. > Is this the expected behaviour? > Is there a single pattern that can be used to parse both date strings (I > receive them and can not change the format)?
Well, one simple and naive way to go, without even looking at the joda docs, would be to cleanup your input so that it matches the pattern (i.e remove duplicate spaces...) g ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Joda-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/joda-interest
