Hello everyone, I am using Joda Time for the first time in a project, and I faced an issue, here. I wrote the following test:
@Test public void testConversion() { LocalDate localDate = new LocalDate(2008, 1, 20); String dateString = localDate.toString(DateTimeFormat.shortDate().withLocale(new Locale("pt_BR"))); assertEquals("20/1/08", dateString); } As you can see, I expected the date to be converted using the pattern 'dd/MM/yyyy', since this is the correct for the Brazilian locale. Nevertheless, the DateTimeFormat converted it using the pattern of the United States ('MM/dd/yyyy'), which results in failure of my test. I checked that even the system in which I'm running has the locale pt_BR. Is there a reason why this is not using the correct pattern for my locale? Regards, Rodrigo ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest