List of utility methods to do XML Date Create
Timestamp | xmlGregorianCalendarToTimestamp(XMLGregorianCalendar xgc) xml Gregorian Calendar To Timestamp if (xgc == null) return null; GregorianCalendar gc = xgc.toGregorianCalendar(); return new Timestamp(gc.getTimeInMillis()); |
String | xmlGregorianToString(XMLGregorianCalendar timestamp) xml Gregorian To String if (timestamp == null) { return null; } else { return dateToString(timestamp.toGregorianCalendar().getTime()); |
String | xmlToDate(XMLGregorianCalendar calendar, DateFormat format) if(null == calendar) return ""; if(null == format) default use format_yyyyMMdd_HHmmss if (null == calendar) { return ""; if (null == format) { format = format_yyyyMMdd_HHmmss; return Format(format, calendar.toGregorianCalendar().getTime()); |
DateTime | xmlToDateTime(final XMLGregorianCalendar xmlCal) xml To Date Time DateTime result = null; if (xmlCal != null) { int hourOfDay = xmlCal.getHour(); int minuteOfHour = xmlCal.getMinute(); int secondOfMinute = xmlCal.getSecond(); int milliOfSecond = xmlCal.getMillisecond(); if (hourOfDay < 0) { hourOfDay = 0; ... |