Class XDateFormatter


  • public class XDateFormatter
    extends Object
    Formatter for Dates
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • format

        public String format​(Date date)
        Converts the given Date to a LONG date String representation
        Parameters:
        date - Date to be converted to a String
        Returns:
        String representation of the given date, formatted by the given pattern and locale. If an error occurs while formatting the date will be returned in default format
      • format

        public String format​(Date date,
                             String pattern)
        Converts the given Date to a String with the given format pattern
        Parameters:
        date - Date to be converted to a String
        pattern - String format pattern
        Returns:
        String representation of the given date, formatted by the given pattern and locale. If an error occurs while formatting the date will be returned in default format