Developer

MAFDateTimeFormatter

The MAFDateTimeFormatter formats date and time values into a format that is either explicitly specified with a string value, or, a preset locale and custom styles (long, short, medium, no style). These options are mutually exclusive, and specifying a string value takes priority: if you explicitly specify a date format, your locale and custom style settings are ignored.

The formatter has static methods so you can use the formatter by calling directly the class level methods on it. For example:
String formattedDate = MAFDateTimeFormatter.formatDate(String dateTime, Locale locale, TimeZone timeZone, int style)
String formattedTime = MAFDateTimeFormatter.formatTime(String dateTime, Locale locale, TimeZone timeZone, int style)
For the method details of the MAFDateTImeFormatter, see its API documentation.