Java Cookbook
day names
Problem:
You want to retrieve all of the day of the week names for a locale.
Solution:
The DateFormatSymbols class contains a wealth of information useful to the localization programmer. You can easily retrieve day names, month names, era names, etc...
To get the days of the week in Korean and English:
//Get a DateFormatSymbols object using a locale as an argument
DateFormatSymbols dfsKorean = new DateFormatSymbols(Locale.KOREAN);
If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.
This site is ad supported. I hope you find something among our sponsors worth clicking. ;)
i18n search
Custom Search