SimpleDateFormat | Android text format DateFormat
publicclassSimpleDateFormatextendsDateFormat[1]SimpleDateFormatisaconcreteclassforformattingandparsingdatesinalocale-sensitivemanner.Itallowsforformatting(date→text),parsing(text→date),andnormalization.SimpleDateFormatallowsyoutostartbychoosinganyuser-definedpatternsfordate-timeformatting.However,youareencouragedtocreateadate-timeformatterwitheithergetTimeInstance,getDateInstance,orgetDateTimeInstanceinDateFormat.Eachoftheseclassmethodscanreturnadate/timeformatterinitializedwithadefaultforma...
public class SimpleDateFormat extends DateFormat[1]
SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. It allows for formatting (date → text), parsing (text → date), and normalization.
SimpleDateFormat allows you to start by choosing any user-defined patterns for date-time formatting. However, you are encouraged to create a date-time formatter with either getTimeInstance, getDateInstance, or getDateTimeInstance in DateFormat. Each of these class methods can return a date/time formatter initialized with a default format pattern. You may modify the format pattern using the applyPattern methods as desired. For more information on using these methods, see DateFormat[2].
Date and Time PatternsDate and time formats are specified by date and time pattern strings. Within date and time pattern strings, unquoted letters from...