I believe that I've found a bug in date formatting for the Swedish locale.
For full dates in Swedish, the CLDR pattern is:
<pattern>EEEE'en' 'den' d:'e' MMMM y</pattern>
(
http://unicode.org/cldr/trac/browser/tags/release-2-0-1/common/main/sv.xml#L1589
)
Which means that today's date should be formatted as "fredag en den 5:
augusti 2011". However, given the following Java code and JodaTime 2.0, I
get a result of "den 5 augusti 2011":
import java.util.Locale;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
public class JodaTest {
public static void main(String[] args) {
DateTime time = new DateTime();
Locale sv = new Locale("sv");
DateTimeFormatter formatter = DateTimeFormat.longDate().withLocale(sv);
System.out.println(formatter.print(time));
}
}
According to CLDR, "den 5 augusti 2011" is not a valid date (although "5
augusti 2011" is). I tried to follow the codepath for date formatting, but
didn't get very far; it looks like this might be the result of a bad import
from CLDR, but I'm not sure.
I'm not sure what the process is for submitting patches is, but if given a
prod in the right direction, I can go about making a patch.
Thanks!
Will
--
William Brown | Engineering, Google NYC | hald...@google.com | 320-584-9293
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest