List of utility methods to do XML Date to
Date | convertXMLGregorianCalendarToDate(final XMLGregorianCalendar calendar) Convert the XMLGregorianCalendar into a Date . if (null == calendar) { throw new IllegalArgumentException("cannot convert null date/time"); return calendar.toGregorianCalendar().getTime(); |
Date | convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar) convert XML Gregorian Calendar To Date return xmlGregorianCalendar.toGregorianCalendar().getTime();
|
Date | convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar) method to convert from Date to XMLGregorianCalendar return xmlGregorianCalendar == null ? null : xmlGregorianCalendar.toGregorianCalendar().getTime();
|
String | ConvertXMLGregorianCalenderToString(XMLGregorianCalendar Calendar, String Format) Convert XML Gregorian Calender To String if (Calendar == null) return ""; SimpleDateFormat sdf = new SimpleDateFormat(Format); GregorianCalendar gregorianCalendar = Calendar.toGregorianCalendar(); return sdf.format(gregorianCalendar.getTime()); |
Date | getDate(XMLGregorianCalendar calendar) get Date if (calendar == null) { return null; return calendar.toGregorianCalendar().getTime(); |
Date | getDate(XMLGregorianCalendar calendar) Gets the date from the XML Gregorian calendar. Date result = calendar.toGregorianCalendar().getTime();
return result;
|
long | GetDateDiffInDays(XMLGregorianCalendar Calendar) Get Date Diff In Days if (Calendar == null) return -1; Date d1 = Calendar.toGregorianCalendar().getTime(); Date today = new Date(); if (today.after(d1)) return -1; long diff = d1.getTime() - today.getTime(); return (diff / (1000 * 60 * 60 * 24)) + 1; ... |
Date | getDateFromXmlGregorianCalendar(XMLGregorianCalendar da) get Date From Xml Gregorian Calendar if (da != null) { int year = da.getYear(); int month = da.getMonth(); int day = da.getDay(); int hour = da.getHour(); int minute = da.getMinute(); int second = da.getSecond(); Calendar calendar = Calendar.getInstance(); ... |
Date | getDateFromXMLGregorianCalendar(XMLGregorianCalendar xmlCalendar) Converts a Date into a XMLGregorianCalendar Date retObj = null; if (xmlCalendar != null) { retObj = xmlCalendar.toGregorianCalendar().getTime(); return retObj; |
Date | getDateFromXMLGregorianCalendar(XMLGregorianCalendar xmlGregorianCalendar) get Date From XML Gregorian Calendar return xmlGregorianCalendar.toGregorianCalendar().getTime();
|