|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Name: chT40241 Date: 03/30/99
Run the below program. The output
GyMdkHmsSEDFwWahKz, dd MMMM yyyy
GanjkHmsSEDFwWxhKz, jj nnnn aaaa
shows that the DateFormatSymbol for month in the French
language locale is 'n'; this should be 'M' (for mois).
'n' is not at all mnemonic for mois.
'M' is not used in the localized pattern characters.
import java.text.*;
import java.util.Locale;
public class DateSymbols
{
public static void main(String argv[])
{
info(Locale.US);
info(Locale.FRENCH);
}
static void info(Locale locale)
{
DateFormatSymbols syms = new DateFormatSymbols(locale);
String mnemonics = syms.getLocalPatternChars();
String s = new SimpleDateFormat("dd MMMM yyyy", locale).toLocalizedPattern();
System.out.println(mnemonics + ", " + s);
}
}
(Review ID: 56312)
======================================================================
pat.cashman@Ireland 2000-12-20
|