Class DateFormatISO8601


  • public class DateFormatISO8601
    extends java.lang.Object
    DateFormatISO8601 is a utility class for formatting and parsing dates according to date format defined by ISO8601.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String format​(java.util.Date date)
      Parse a date/time string.
      static java.lang.String format​(java.util.Date date, com.ibm.icu.util.TimeZone timeZone)
      Format a date/time object.
      static com.ibm.icu.text.SimpleDateFormat getDateFormat​(java.lang.String source, com.ibm.icu.util.TimeZone timeZone)
      Deprecated.
      use getSimpleDateFormat instead
      static com.ibm.icu.text.SimpleDateFormat getSimpleDateFormat​(java.lang.String source, com.ibm.icu.util.TimeZone timeZone)
      Get a date format object that can parse the given date/time string
      static java.util.Date parse​(java.lang.String source, com.ibm.icu.util.TimeZone timeZone)
      Parse a date/time string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateFormatISO8601

        public DateFormatISO8601()
    • Method Detail

      • parse

        public static java.util.Date parse​(java.lang.String source,
                                           com.ibm.icu.util.TimeZone timeZone)
                                    throws BirtException,
                                           java.text.ParseException
        Parse a date/time string.
        Parameters:
        source -
        Returns:
        Throws:
        java.text.ParseException
        BirtException
      • getDateFormat

        @Deprecated
        public static com.ibm.icu.text.SimpleDateFormat getDateFormat​(java.lang.String source,
                                                                      com.ibm.icu.util.TimeZone timeZone)
                                                               throws BirtException
        Deprecated.
        use getSimpleDateFormat instead
        Throws:
        BirtException
      • getSimpleDateFormat

        public static com.ibm.icu.text.SimpleDateFormat getSimpleDateFormat​(java.lang.String source,
                                                                            com.ibm.icu.util.TimeZone timeZone)
                                                                     throws BirtException
        Get a date format object that can parse the given date/time string
        Parameters:
        source -
        timeZone -
        Returns:
        Throws:
        BirtException
        java.text.ParseException
        Since:
        4.8
      • format

        public static java.lang.String format​(java.util.Date date,
                                              com.ibm.icu.util.TimeZone timeZone)
                                       throws BirtException
        Format a date/time object.
        Parameters:
        date -
        timeZone -
        Returns:
        Throws:
        BirtException
      • format

        public static java.lang.String format​(java.util.Date date)
                                       throws BirtException
        Parse a date/time string.
        Parameters:
        source -
        Returns:
        Throws:
        java.text.ParseException
        BirtException