Class DateUtil

java.lang.Object
org.jolokia.server.core.util.DateUtil

public final class DateUtil extends Object
Utility used for date handling
Since:
17.04.11
Author:
roland
  • Method Details

    • fromISO8601

      public static Date fromISO8601(String pDateString)
      Parse an ISO-8601 string into an date object
      Parameters:
      pDateString - date string to parse
      Returns:
      the parse date
      Throws:
      IllegalArgumentException - if the provided string does not conform to ISO-8601
    • toISO8601

      public static String toISO8601(Date pDate)
      Convert a given date to an ISO-8601 compliant string representation for the default timezone
      Parameters:
      pDate - date to convert
      Returns:
      the ISO-8601 representation of the date
    • toISO8601

      public static String toISO8601(Date pDate, TimeZone pTimeZone)
      Convert a given date to an ISO-8601 compliant string representation for a given timezone
      Parameters:
      pDate - date to convert
      pTimeZone - timezone to use
      Returns:
      the ISO-8601 representation of the date