Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8268379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:51:59+00:00 2026-06-08T05:51:59+00:00

I cant get to work a simple code in a fresh project that is

  • 0

I can”t get to work a simple code in a fresh project that is suppose to simply write one date in many langage depending on the Locale set.

Locale[] locales = new Locale[] {
            Locale.JAPAN,
            Locale.CHINA,
            Locale.KOREA,
            Locale.TAIWAN,
            Locale.ITALY,
            Locale.FRANCE,
            Locale.GERMAN
    };

    // Get an instance of current date time
    Date today = new Date();

    //
    // Iterates the entire Locale defined above and create a long 
    // formatted date using the SimpleDateFormat.getDateInstance() 
    // with the format, the Locale and the date information.
    //
    for (Locale locale : locales) {
        System.out.println("Date format in "
            + locale.getDisplayName() 
            + " = "
            + SimpleDateFormat.getDateInstance(
                  SimpleDateFormat.LONG, locale)
                      .format(today).toUpperCase());
    }
}

Here is the link of this code : URL of the code below

Now here is what it’s suppose to display

Date format in Japanese (Japan) = 2009/01/04

Date format in Chinese (China) = 2009年1月4日

Date format in Korean (South Korea) = 2009년 1월 4일 (일)

Date format in Chinese (Taiwan) = 2009年1月4日

Date format in Italian (Italy) = 4 GENNAIO 2009

Date format in French (France) = 4 JANVIER 2009

Date format in German = 4. JANUAR 2009

And here is MY display :

Date format in Japanese (Japan) = 2012 7 21

Date format in Chinese (China) = 2012 7 21

Date format in Korean (South Korea) = 2012 7 21

Date format in Chinese (Taiwan) = 2012 7 21

Date format in Italian (Italy) = 2012 7 21

Date format in French (France) = 2012 7 21

Date format in German = 2012 7 21

PROBLEM : What’s wrong ? Am I forgeting some obvious thing ? Do you have any lead ?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T05:52:01+00:00Added an answer on June 8, 2026 at 5:52 am

    As it turned out it’s a device-specific problem. The code works on a phone with correct locale data and also on emulator. On HTC Desire there are some ROMs which have locale data corrupted. More on this issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be a really simple one, but just cant get it to work.
This should be simple, yet I can't get it to work. I have a
A very simple thing, and I can't get it to work. I want to
This should be a simple question, but I can't get it to work :(
I just can't get the ajax service to work. A simple class to $.get(http://google.com)
I can't seem to get even a simple fade-in effect to work on chrome
I cant get jquery's date picker to work on my page. I have a
how can i do that. i try many ways. but i cant . the
I'm stuck! I have this very simple test code and I can't get it
this seemed simple at first but I can't get it to work. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.