Here you can find the source of convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar)
Parameter | Description |
---|---|
xmlGregorianCalendar | to be converted |
public static Date convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar)
//package com.java2s; import java.util.Date; import javax.xml.datatype.XMLGregorianCalendar; public class Main { /**//w ww. j a v a2 s.c o m * method to convert from Date to XMLGregorianCalendar * * @param xmlGregorianCalendar * to be converted * @return Date converted representation */ public static Date convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar) { return xmlGregorianCalendar == null ? null : xmlGregorianCalendar.toGregorianCalendar().getTime(); } }