Class DateTimeUtils
- java.lang.Object
-
- microsoft.exchange.webservices.data.util.DateTimeUtils
-
public final class DateTimeUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateconvertDateStringToDate(String value)Converts a date string to local date time.static DateconvertDateTimeStringToDate(String value)Converts a date time string to local date time.
-
-
-
Method Detail
-
convertDateTimeStringToDate
public static Date convertDateTimeStringToDate(String value)
Converts a date time string to local date time. Note: this method also allows dates without times, in which case the time will be 00:00:00 in the supplied timezone. UTC timezone will be assumed if no timezone is supplied.- Parameters:
value- The string value to parse.- Returns:
- The parsed
Date. - Throws:
IllegalArgumentException- If string can not be parsed.
-
convertDateStringToDate
public static Date convertDateStringToDate(String value)
Converts a date string to local date time. UTC timezone will be assumed if no timezone is supplied.- Parameters:
value- The string value to parse.- Returns:
- The parsed
Date. - Throws:
IllegalArgumentException- If string can not be parsed.
-
-