Class DateFormatISO8601

java.lang.Object
org.eclipse.birt.core.data.DateFormatISO8601

public class DateFormatISO8601 extends Object
DateFormatISO8601 is a utility class for formatting and parsing dates according to date format defined by ISO8601.
  • Constructor Details

    • DateFormatISO8601

      public DateFormatISO8601()
  • Method Details

    • parse

      public static Date parse(String source, com.ibm.icu.util.TimeZone timeZone) throws BirtException, ParseException
      Parse a date/time string.
      Parameters:
      source - date string to be parsed
      timeZone - time zone
      Returns:
      the parsed string as date
      Throws:
      BirtException
      ParseException
    • getDateFormat

      @Deprecated public static com.ibm.icu.text.SimpleDateFormat getDateFormat(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(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:
      the parsed date/time string
      Throws:
      BirtException
      Since:
      4.8
    • format

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

      public static String format(Date date) throws BirtException
      Parse a date/time string.
      Parameters:
      date - date to be formated
      Returns:
      the formated date/time
      Throws:
      BirtException