JDK-4807540 : DateFormat is invalid for Slovenian locale
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-01-24
  • Updated: 2004-04-01
  • Resolved: 2003-09-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Description

Name: rmT116609			Date: 01/23/2003


FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

FULL OPERATING SYSTEM VERSION : Microsoft Windows 2000
[Version 5.00.2195], Service Pack III


A DESCRIPTION OF THE PROBLEM :
When using Slovenian locale with DateFormat, the date gets
imporperly formated.

Instead of dd.mm.yyyy (same as german), the output is yy.mm.dd.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.text.DateFormat;
import java.util.Locale;

Locale si = new Locale("sl", "si");
DateFormat df = DateFormat.getDateInstance
(DateFormat.MEDIUM, si);

System.out.println(df.format(new Date()));


EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: 13.8.2002
Actual: 2002.8.13

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.text.DateFormat;
import java.util.Locale;

Locale si = new Locale("sl", "si");
DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, si);

System.out.println(df.format(new Date()));

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
import java.text.DateFormat;
import java.util.Locale;

public DateFormat getDateInstance(Locale loc) {
  if(loc.getLanguage().equals("sl")) {
    loc = new Locale("de");
  }
  return(DateFormat.getDateInstance(DateFormat.MEDIUM,
loc));
}
(Review ID: 160704) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b22 VERIFIED IN: tiger-beta2
14-06-2004

EVALUATION ###@###.### 2003-02-20 Can you provide me with an official (or even semi-official) standard for this? We normally use ICU as a handy checklist for date/time formats etc, and according to that the format is yy.mm.dd. ###@###.### 2003-03-28 Hi Bojan, I've confirmed that both windows and solaris use the same date format for slovenian, so I'll fix java to match these two. You've mentioned other problems with slovenian (currency format?), and some problems with other eastern european locales as well. Can you list those out again, so I know what else I have to look for? Also, we are currenty in stoppers-only builds of the latest release, so this will have to be fixed in the next release. ###@###.### 2003-06-03 I'll fix the date format for slovenian for this bug. I still don;t have the info for the rest of the issues, so I'll ignore them for the moment and concentrate on what I know is wrong. ###@###.### 2003-09-19 ******** l10n evaluation template - begin *********** Evaluation : Synching date formats up with windows & solaris sccsdiff info (e.g. sccs diffs -r1.30 1.31 Activator_fr.java): ------- LocaleElements_sl.java ------- 128,131c128,131 < "EEEE, yyyy, MMMM d", // full date pattern < "EEEE, yyyy, MMMM d", // long date pattern < "yyyy.M.d", // medium date pattern < "y.M.d", // short date pattern --- > "EEEE, d MMMM yyyy", // full date pattern > "EEEE, d MMMM yyyy", // long date pattern > "d.M.yyyy", // medium date pattern > "d.M.y", // short date pattern List file(s) to be delivered : src/share/classes/sun/text/resources/LocaleElements_sl.java Target Build : Tiger Additional Info : ******** l10n evaluation template - end***********
11-06-2004