I read the documentation for the android.text.format.DateFormat class on the Android developers website (located at http://developer.android.com/reference/android/text/format/DateFormat.html ) to find out more about this. In particular, I am trying to format the date so that it can be read by a person, so I found a method (CharSequence inFormat, Date inDate) and thought that I would use it. Now, most of the examples that I could find to use this method look something like this: android.text.format.DateFormat.format ("MM / dd / yyyy", new java.util.Date ());
However, the documentation states:
Most callers should avoid providing their own format strings to the format methods of this class and rely on properly localized ones delivered by the system.
From this line my confusion and questions arise.
1.) The documentation does not seem to indicate (at least I could not find it anywhere, despite the most difficult search), how to access correctly localized strings that it says that the system provides. How is this achieved?
2.) Is it permissible (despite what the documentation says) to provide my own format string, as in the example line above?
Thanks in advance for your help!
source
share