Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Internationalization question

0 views
Skip to first unread message

Paul Tomblin

unread,
Jan 21, 2003, 3:37:09 PM1/21/03
to
Ok, both Java's DateFormatter and the files in /usr/lib/locale both seem
to say that China and Taiwan should use a 12 hour clock with am/pm
symbols. But my translator "expert" says that's wrong - that China always
uses a 24 hour clock and Taiwan uses 12 hour clocks.

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.

Michael Borgwardt

unread,
Jan 22, 2003, 6:27:15 AM1/22/03
to
Paul Tomblin wrote:
> Ok, both Java's DateFormatter and the files in /usr/lib/locale both seem
> to say that China and Taiwan should use a 12 hour clock with am/pm
> symbols. But my translator "expert" says that's wrong - that China always
> uses a 24 hour clock and Taiwan uses 12 hour clocks.
>
> 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'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

Paul Tomblin

unread,
Jan 22, 2003, 10:30:05 AM1/22/03
to
In a previous article, Michael Borgwardt <bra...@brazils-animeland.de> said:

>Paul Tomblin wrote:
>> 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'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.

0 new messages