Code example for XMLGregorianCalendar

Methods: toGregorianCalendar

0
     */ 
    public static java.util.Date asDate(XMLGregorianCalendar xgc) {
        if (xgc == null) {
            return null; 
        } else { 
            return xgc.toGregorianCalendar().getTime();
        } 
    } 
     
	public static void main(String[] args) {
		 System.out.println(asXMLGregorianCalendar(new Date()));
	} 
}