com.here.msdkui.common

## Class DateFormatterUtil

- java.lang.Object
- - com.here.msdkui.common.DateFormatterUtil

-     public final class DateFormatterUtil
      extends java.lang.Object

  A convenience class to convert `Date` to a readable string representation or to convert a formatted string to a `Calendar` representation.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `format(android.content.Context context, java.util.Date date)` Converts `Date` to a short string representation using abbreviations.
    `static java.lang.String` | `format(java.util.Date date)` Converts `Date` to a string representation using `DateFormat.SHORT` and the default locale of device.
    `static java.util.Calendar` | `format(java.lang.String dateString)` Converts the given string of format `dd-MM-yyyy HH:mm:ss` to `Calendar`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### format

          public static java.util.Calendar format(java.lang.String dateString)

      Converts the given string of format `dd-MM-yyyy HH:mm:ss` to `Calendar`.
      Parameters:
        `dateString` - source string to be converted to `Calendar`.
      Returns:
        a `Calendar` or `null` when source string could not be parsed.

    - #### format

          public static java.lang.String format(java.util.Date date)

      Converts `Date` to a string representation using `DateFormat.SHORT` and the default locale of device.
      Parameters:
        `date` - the `Date` to be converted to string representation.
      Returns:
        a formatted string.

    - #### format

          public static java.lang.String format(android.content.Context context,
                                                java.util.Date date)

      Converts `Date` to a short string representation using abbreviations.

      In general, times are abbreviated by not showing the minutes if they are 0. For example, instead of "3:00pm" the time would be abbreviated to "3pm". If date is not today, month is shown as a 3-letter string.

      Parameters:
        `context` - the required context.
        `date` - the `Date` to be converted to string representation.
      Returns:
        a string containing the formatted date.