List of utility methods to do XML Date Create
Calendar | xmlCalendarToCalendar(XMLGregorianCalendar cal) xml Calendar To Calendar return cal.toGregorianCalendar();
|
Calendar | xmlCalendarToCalendar(XMLGregorianCalendar xmlCalendar) xml Calendar To Calendar if (xmlCalendar == null) { return null; return xmlCalendar.toGregorianCalendar(); |
Date | xmlDateToDate(XMLGregorianCalendar xmlCalendar) xml Date To Date GregorianCalendar calendar = xmlCalendar.toGregorianCalendar();
return calendar.getTime();
|
long | xmlDateToLong(String s) xml Date To Long if (s == null) return -1; try { XMLGregorianCalendar cal = DatatypeFactory.newInstance().newXMLGregorianCalendar(s); return cal.toGregorianCalendar().getTimeInMillis(); } catch (DatatypeConfigurationException dce) { return -1; |
long | xmlGCtoMillis(XMLGregorianCalendar gc) xml G Cto Millis return gc != null ? gc.toGregorianCalendar().getTimeInMillis() : 0L;
|
GregorianCalendar | xmlGregorian2Gregorian(XMLGregorianCalendar xmlGC) xml Gregorian Gregorian return xmlGC.toGregorianCalendar();
|
XMLGregorianCalendar | xmlGregorianCalendar() xml Gregorian Calendar GregorianCalendar cal = new GregorianCalendar(); return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal); |
Date | xmlGregorianCalendarToDate(XMLGregorianCalendar cal) xml Gregorian Calendar To Date GregorianCalendar gregorianCalendar = cal.toGregorianCalendar();
return gregorianCalendar.getTime();
|
Date | xmlGregorianCalendarToDate(XMLGregorianCalendar calendar) Converts XMLGregorianCalendar to java.util.Date in Java if (calendar == null) { return null; return calendar.toGregorianCalendar().getTime(); |
Date | XMLGregorianCalendarToDate(XMLGregorianCalendar gc) XML Gregorian Calendar To Date return new Date(gc.toGregorianCalendar().getTimeInMillis()); |