Package org.jolokia.server.core.util
Class DateUtil
java.lang.Object
org.jolokia.server.core.util.DateUtil
Utility used for date handling
- Since:
- 17.04.11
- Author:
- roland
-
Method Summary
Modifier and TypeMethodDescriptionstatic DatefromISO8601(String pDateString) Parse an ISO-8601 string into an date objectstatic StringConvert a given date to an ISO-8601 compliant string representation for the default timezonestatic StringConvert a given date to an ISO-8601 compliant string representation for a given timezone
-
Method Details
-
fromISO8601
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
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
Convert a given date to an ISO-8601 compliant string representation for a given timezone- Parameters:
pDate- date to convertpTimeZone- timezone to use- Returns:
- the ISO-8601 representation of the date
-