RSS Forums RSS

Help me to get the loCale

Please support our Java advertiser: Programming Forums
Reply
Posts: 23
Reputation: sarath.koiloth is an unknown quantity at this point 
Solved Threads: 0
sarath.koiloth's Avatar
sarath.koiloth sarath.koiloth is offline Offline
Newbie Poster

Help me to get the loCale

  #1  
Aug 6th, 2008
Sir,

is there any method which return the Local on giving a date as argument.

publlic Locale getLocale(Date d){
//
return locale
}

help me to get the locale.


Please help me to get the locale on giving the date.Ie when i give us date,i need to get US.

Please help .....
AddThis Social Bookmark Button
Reply With Quote  
Posts: 1,158
Reputation: javaAddict is just really nice javaAddict is just really nice javaAddict is just really nice javaAddict is just really nice 
Solved Threads: 163
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Veteran Poster

Re: Help me to get the loCale

  #2  
Aug 6th, 2008
You can use the Locale to parse a certain Date object:

SimpleDateFormat.html

And use the constructor with the Locale as argument.

SimpleDateFormat(/*String pattern*/ "dd/MM/yyyy",  Locale.ENGLISH) 

But I don't think that what you are asking is possible.
There are 3 ways to do things:
The right way, the wrong way,
And The Object Oriented Way.

When you do things your way, make sure you don't forget the Object Oriented Way
Reply With Quote  
Posts: 23
Reputation: sarath.koiloth is an unknown quantity at this point 
Solved Threads: 0
sarath.koiloth's Avatar
sarath.koiloth sarath.koiloth is offline Offline
Newbie Poster

How to get Date format of different countries

  #3  
Aug 7th, 2008
Hi Friends,

Please help me to find out the different date format of the countirs, ie MM/dd/YYYY is the dateformats of US and dd/MM/YYYY is for india.lke this i want to compare a date with all the dateformats avaliable in our Computer.
Reply With Quote  
Posts: 23
Reputation: sarath.koiloth is an unknown quantity at this point 
Solved Threads: 0
sarath.koiloth's Avatar
sarath.koiloth sarath.koiloth is offline Offline
Newbie Poster

DatePicker

  #4  
Aug 26th, 2008
Can any one send me a link to to download a Datepicker for my swing based application.The date picker must support the default locale.ie when i give a US date ,It must be shown as the defult locale date format ?please help me...

Also can any one help me to convert the US date to all other date formats.
For eg:

when i give setDate("05/01/2008"); //Usdate MM/dd/yyyy
the i must get the date in all different formats like dd/mm/yyyy,yyyy/dd/mm etc..

Please help me to solve this issue
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the Java Forum
Views: 975 | Replies: 3 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:28 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC