{"id":78,"date":"2014-03-31T05:38:08","date_gmt":"2014-03-31T09:38:08","guid":{"rendered":"https:\/\/cindypotvin.com\/?p=78"},"modified":"2017-02-18T16:36:03","modified_gmt":"2017-02-18T21:36:03","slug":"formatting-dates-with-java-in-android-applications","status":"publish","type":"post","link":"https:\/\/cindypotvin.com\/formatting-dates-with-java-in-android-applications\/","title":{"rendered":"Formatting Dates with Java in Android Applications"},"content":{"rendered":"

To format dates in an Android application, you must keep in mind that dates formatted using the Android SDK take into account the locale, which includes the country and language (this is also called a culture). The locale is configured in the Settings<\/em> application of the device. In general using the locale of the device is the best option, but this may be unacceptable for enterprise applications where all users need to see the same format, regardless of the language of the device. Also, dates that are saved to a file or a database should always have the same format.<\/p>\n

Here is a list of the many classes involved in handling and formatting dates :<\/p>\n