ICU-10113 Updated DateTimePatternGeneratorSample.java. Replace gen.addPattern("d'. von' MMMM", true, returnInfo) with gen.addPattern("dd'. von' MMMM", true, returnInfo) to make the sample applicable to other locales, such as German, Simplified Chinese etc.
X-SVN-Rev: 33758
This commit is contained in:
parent
4dea9653dc
commit
32931929cb
@ -124,7 +124,7 @@ public class DateTimePatternGeneratorSample {
|
||||
SimpleDateFormat format = new SimpleDateFormat(gen.getBestPattern("MMMMddHmm"), locale);
|
||||
DateTimePatternGenerator.PatternInfo returnInfo = new DateTimePatternGenerator.PatternInfo();
|
||||
// Add '. von' to the existing pattern
|
||||
gen.addPattern("d'. von' MMMM", true, returnInfo);
|
||||
gen.addPattern("dd'. von' MMMM", true, returnInfo);
|
||||
// Apply the new pattern
|
||||
format.applyPattern(gen.getBestPattern("MMMMddHmm"));
|
||||
System.out.println("New Pattern for FRENCH: "+format.toPattern());
|
||||
|
Loading…
Reference in New Issue
Block a user