Here you can find the source of getDateFromXMLGregorianCalendar(XMLGregorianCalendar xmlCalendar)
Parameter | Description |
---|---|
date | the date to be converted |
Parameter | Description |
---|---|
DatatypeConfigurationException | an exception |
public static Date getDateFromXMLGregorianCalendar(XMLGregorianCalendar xmlCalendar)
//package com.java2s; //License from project: Open Source License import java.util.Date; import javax.xml.datatype.XMLGregorianCalendar; public class Main { /**/*from w w w . j ava2 s. c om*/ * Converts a {@link Date} into a {@link XMLGregorianCalendar} * * @param date * the date to be converted * @return the XMLGregorianCalendar representing the date converted * @throws DatatypeConfigurationException */ public static Date getDateFromXMLGregorianCalendar(XMLGregorianCalendar xmlCalendar) { Date retObj = null; if (xmlCalendar != null) { retObj = xmlCalendar.toGregorianCalendar().getTime(); } return retObj; } }