Package com.primavera.integration.util
Class XSDHelper
java.lang.Object
com.primavera.integration.util.XSDHelper
Helper class for converting XSD dateTime format strings to Java dates, and vice-versa.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DategetDateFromString(String sDateTime) Gets a Date representation of a String that conforms to the xsd:dateTime format defined in XML Schema.static DategetDateFromStringWithTZOffset(String sDateTimeZ) static StringgetStringFromDate(Date date) Gets a String representation of a Date, conforming to the xsd:dateTime format defined in XML Schema.
-
Method Details
-
getDateFromString
Gets a Date representation of a String that conforms to the xsd:dateTime format defined in XML Schema.- Parameters:
sDateTime- the string to convert- Returns:
- Date the date representation of the value
- Throws:
InvalidValueException- if the given string was not of the proper xsd:dateTime format
-
getStringFromDate
Gets a String representation of a Date, conforming to the xsd:dateTime format defined in XML Schema.- Parameters:
date- the date to convert- Returns:
- String a string representation of the value
-
getDateFromStringWithTZOffset
public static Date getDateFromStringWithTZOffset(String sDateTimeZ) throws InvalidValueException, ParseException - Throws:
InvalidValueExceptionParseException
-