Description
The last example before the "Organization" section in the class doc is incorrect. The example, with imports elided, is:
Calendar c = new GregorianCalendar(1995, MAY, 23);
String s = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
// -> s == "Duke's Birthday: May 23, 1995"
Instead, to match the output shown, it should probably be this:
Calendar c = new GregorianCalendar(1995, MAY, 23);
String s = String.format("Duke's Birthday: %1$tb %1$te, %1$tY", c);
// -> s == "Duke's Birthday: May 23, 1995"
That is, the %1$tm conversion should be %1$tb, and a space should be added after the comma.
(Filed on behalf of joe.bowbeer@gmail.com)
Calendar c = new GregorianCalendar(1995, MAY, 23);
String s = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c);
// -> s == "Duke's Birthday: May 23, 1995"
Instead, to match the output shown, it should probably be this:
Calendar c = new GregorianCalendar(1995, MAY, 23);
String s = String.format("Duke's Birthday: %1$tb %1$te, %1$tY", c);
// -> s == "Duke's Birthday: May 23, 1995"
That is, the %1$tm conversion should be %1$tb, and a space should be added after the comma.
(Filed on behalf of joe.bowbeer@gmail.com)