Personally, I'm more inclined to believe Sun than this guy, but I need
some hard facts to back myself up. Can somebody point me to some proof
one way or the other? I've been looking on the web and all I can find is
stuff about the "ISO date/time format" which isn't good enough - we can't
start dictating to the world what to use, we have to use what they expect.
--
Paul Tomblin <ptom...@xcski.com>, not speaking for anybody
There are three kinds of people: Those who can count & those who can't.
I'd say that this is not a Java question and that you'd have much better chances
of getting a well-founded answer by asking on soc.culture.china and
soc.culture.taiwan
Actually, I'm more interest in where Sun got their information, like if
it's from a standards body or something, than discussing the cultural
implications. That's why I posted here, and why I specifically asked for
"proof" rather than supposition.
Here's the weird thing: In the Chinese locale (zh_CN), if I do a
DateFormat.getTimeInstance(DateFormat.MEDIUM)
I get a 24 hour clock (17:04:34), but if I do a
DateFormat.getTimeInstance(DateFormat.SHORT)
I get a 12 hour clock (<symbol><symbol>5:04)
Since I don't need the seconds, I was using SHORT, but since I need it to
be a 24 hour clock everywhere except en_US and en_CA, I've gone to getting
the MEDIUM time instance, getting the pattern, stripping out the seconds,
and making a new DateFormat. Like this:
DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.MEDIUM);
if (dateFormat instanceof SimpleDateFormat)
{
String str = ((SimpleDateFormat)dateFormat).toPattern();
str = str.replaceFirst(":ss", "");
dateFormat = new SimpleDateFormat(str);
}
return dateFormat;
Horrible, isn't it? But it works for all our customer location (US,
Canada, England, France, Italy, Spain, China, Japan and Taiwan).
--
Paul Tomblin <ptom...@xcski.com>, not speaking for anybody
Pascal - A programming language named after a man who would turn over in his
grave if he knew about it.