Java XML Date Create toDate(XMLGregorianCalendar dateTime)

Here you can find the source of toDate(XMLGregorianCalendar dateTime)

Description

Convert an XML date/time to its java.util.Date equivalent.

License

LGPL

Parameter

Parameter Description
dateTime the XML date/time to convert

Return

a Java date

Declaration

public static Date toDate(XMLGregorianCalendar dateTime) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.util.*;
import javax.xml.datatype.*;

public class Main {
    /**//w  ww . jav a2 s . c o m
     * Convert an XML date/time to its <code>java.util.Date</code> equivalent.
     * 
     * @param dateTime the XML date/time to convert
     * @return a Java date
     */
    public static Date toDate(XMLGregorianCalendar dateTime) {
        return dateTime.toGregorianCalendar().getTime();
    }
}

Related

  1. toDate(final XMLGregorianCalendar xml)
  2. toDate(long date)
  3. toDate(XMLGregorianCalendar cal)
  4. toDate(XMLGregorianCalendar cal)
  5. toDate(XMLGregorianCalendar date)
  6. toDate(XMLGregorianCalendar xmlCalendar)
  7. toDate(XMLGregorianCalendar xmlGregorianCalendar)
  8. toDateTime()
  9. toDateTime(Date date)