The i18n Cookbook - recipies for a global society

  • java cookbook
  • about the author
Home

Java Cookbook

  • Java Internationalization Cookbook

day of week

Get the first day of the week

Problem:

You want to find the first day of the week for a locale and display it.

Solution:

To get the first day of the week for a calendar in a particular locale you need to first get the Calendar instance by passing in the Locale, then retrieve a DateFormatSymbols object using the same Locale. You can then use the DateFormatSymbols to retrieve an array of weekdays and use the numeric first day of week value returned from the Calendar to get the a human readable first day of week.

  • date
  • DateFormatSymbols
  • day of week
  • Java
  • Add new comment
  • Read more

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

Google
Custom Search
Syndicate content

Search

Tags in Tags

calendar date icu4j Java Locale number format numberformat parse spellout timezone transliteration transliterator
more tags

User login

  • Create new account
  • Request new password
  • java cookbook
  • about the author