EVALUATION
j2se:src/share/classes/sun/text/resources/
------- FormatData_fr.java -------
132c132
< { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
---
> { "DateTimePatternChars", "GaMjkHmsSEDFwWahKzZ" },
------- FormatData_fr_BE.java -------
63c63
< { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
---
> { "DateTimePatternChars", "GaMjkHmsSEDFwWahKzZ" },
------- FormatData_fr_CA.java -------
55c55
< { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
---
> { "DateTimePatternChars", "GaMjkHmsSEDFwWahKzZ" },
------- FormatData_fr_CH.java -------
70c70
< { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
---
> { "DateTimePatternChars", "GaMjkHmsSEDFwWahKzZ" },
j2se:test/sun/text/resources
------- LocaleData -------
5473a5474,5482
>
> # bug 4225362
> FormatData/fr/DateTimePatternChars=GaMjkHmsSEDFwWahKzZ
> FormatData/fr_BE/DateTimePatternChars=GaMjkHmsSEDFwWahKzZ
> FormatData/fr_CA/DateTimePatternChars=GaMjkHmsSEDFwWahKzZ
> FormatData/fr_CH/DateTimePatternChars=GaMjkHmsSEDFwWahKzZ
> FormatData/fr_FR/DateTimePatternChars=GaMjkHmsSEDFwWahKzZ
> FormatData/fr_LU/DateTimePatternChars=GaMjkHmsSEDFwWahKzZ
>
------- LocaleDataTest.java -------
10c10
< * 6414459 6455680 6498742 6533691 6547501 6531591 6531593
---
> * 6414459 6455680 6498742 6533691 6547501 6531591 6531593 4225362
|
|
|
EVALUATION
Submitters request as well as the CLDR wants
YEAR_FIELD="a"
MONTH_FIELD="M"
DATE_FIELD="j"
Fix the j2se:src/share/classes/sun/text/resources/FormatData_fr
Affected are
FormatData_fr.java
FormatData_fr_BE.java
FormatData_fr_CA.java
FormatData_fr_CH.java
Correct "DateTimePatternChars"="GaMjkHmsSEDFwWahKzZ"
|
|
|
WORK AROUND
Name: chT40241 Date: 03/30/99
none.
======================================================================
pat.cashman@Ireland 2000-12-21
Change the code to explicitly set the LocalPatternChars which are used in
translating the date, as follows
import java.util.Date;
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)
{
System.out.println("\nLocale = " + locale);
// Original customer code
DateFormatSymbols syms = new DateFormatSymbols(locale);
String s = new SimpleDateFormat("dd MMMM yyyy", locale).toLocalizedPattern ();
String mnemonics = syms.getLocalPatternChars();
System.out.println("Orig -->" + mnemonics + ", " + s);
// Workaround code from Sun
SimpleDateFormat my_date = new SimpleDateFormat("dd MMMM yyyy",locale);
DateFormatSymbols my_syms = my_date.getDateFormatSymbols();
// Change the Character Pattern String as necesssary
if (locale.toString().equals("fr"))
my_syms.setLocalPatternChars("GamjkHmsSEDFwWxhKz");
my_date.setDateFormatSymbols(my_syms);
String my_mnemonics = my_syms.getLocalPatternChars();
String my_s = my_date.toLocalizedPattern ();
System.out.println("New --->" + my_mnemonics + ", " + my_s);
}
}
|
|
|
EVALUATION
There's absolutely no way to tell from the javadoc what the meaning of localized pattern characters is, what constitutes a valid local pattern chars string, how these characters interact with SimpleDateFormat, and what setLocalPatternChars is supposed to do. Before any other action is taken on this bug, we need a complete specification of this, in the javadoc.
norbert.lindenberg@Eng 1999-03-30
See "Serialized Form" of DateFormatSymbols for `localPatternChars' documentation. For the documentation problem, see 4312282.
masayoshi.okutsu@Eng 2000-02-14
|
|
|
|