Japanese Locale and SimpleDateFormat

S

sameergn

Hi,

The code

SimpleDateFormat formatter = new SimpleDateFormat ("dd/MMM/yyyy", new
Locale("ja", "JP"));
System.out.println("Date = " + formatter.format(new Date()));

prints date in the format 23/6/2005.

Can we not get 3 char month name in Japanese locale?
Does the Japanese language have 3 character month names?

Thanks,
Sameer.
 
P

Pete Barrett

Hi,

The code

SimpleDateFormat formatter = new SimpleDateFormat ("dd/MMM/yyyy", new
Locale("ja", "JP"));
System.out.println("Date = " + formatter.format(new Date()));

prints date in the format 23/6/2005.

Can we not get 3 char month name in Japanese locale?
Does the Japanese language have 3 character month names?
Since Japanese uses about 5 different writing systems, I would doubt
it! At least without further narrowing the Locale.

I suppose though, that you have checked that Japanese resources are
available on your computer to use in a Japanese locale? If they're not
available, they can't be used, though the Locale will still be
created. In that case, what you have may the best it can manage.


Pete Barrett
 
S

sameergn

Pete said:
Since Japanese uses about 5 different writing systems, I would doubt
it! At least without further narrowing the Locale.

I suppose though, that you have checked that Japanese resources are
available on your computer to use in a Japanese locale? If they're not
available, they can't be used, though the Locale will still be
created. In that case, what you have may the best it can manage.


Pete Barrett

Thanks for your reply.
I found this page which says that Japan does not use month names as
such.
http://www.sf.airnet.ne.jp/~ts/japanese/monthday.html
We checked with our Japanese clients and they are ok with using a digit
instead of 3 letter month name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top