Reputation: 1703
I'm not sure these cases are possible, but I have format strings for a US locale,
1. ccc \'at\' h:m a
2. yyyy-MM-dd'T'HH:mm:ss.SSSZ
I want to format a Date object into another locale using the analagous format strings. For example, "Wed at 2:30 PM" should render as "Miercoles a la 10:30 am" in spanish.
Calendar.getDateInstance is great for localization, but relies on predefined integer constants that represent formats.
Upvotes: 1
Views: 57
Reputation: 6306
If you are using a SimpleDateFormat, you will need to create an instance with the target Locale. If you are using a DateFormat style, you would need to get an instance for the target locale.
In both cases, it appears you want to change the timezone also.
Upvotes: 1