wood burning stoves 2.0*
The moose likes Java in General and the fly likes Date using Calendar for a spcific Locale Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Date using Calendar for a spcific Locale" Watch "Date using Calendar for a spcific Locale" New topic
Author

Date using Calendar for a spcific Locale

adithya narayan
Ranch Hand

Joined: Jan 05, 2009
Posts: 79

Hi,

I tried the following but it didn't work as expected:


which printed :



I was expecting it to print the current date in Italy.

Can anyone explain?

Thanks,
Adithya.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

You could try using Locale.ITALY instead of "it".


Mohamed Sanaulla | My Blog
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 557
Rather than just trying things, I suggest you refer to the API, Calendar API.


Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date using Calendar for a spcific Locale
 
Similar Threads
java.util.Date getYear() method is deprecated
Locale Class
JTable dates
java.util.date time is different than the system time
Chinese Calender Date is not able to parse