Example usage for javax.xml.datatype XMLGregorianCalendar toGregorianCalendar

List of usage examples for javax.xml.datatype XMLGregorianCalendar toGregorianCalendar

Introduction

In this page you can find the example usage for javax.xml.datatype XMLGregorianCalendar toGregorianCalendar.

Prototype

public abstract GregorianCalendar toGregorianCalendar(java.util.TimeZone timezone, java.util.Locale aLocale,
        XMLGregorianCalendar defaults);

Source Link

Document

Convert this XMLGregorianCalendar along with provided parameters to a GregorianCalendar instance.

Usage

From source file:com.ibm.jaql.json.type.JsonDate.java

/** Sets the date represented by this <code>JsonDate</code> object to the specified value.
 * /*w  w  w  .  jav  a 2 s . com*/
 * @param date string representation of the data in iso8601 (only UTC specified by a Z right now) 
 */
protected void set(String date) {
    XMLGregorianCalendar xcal = CAL_FACTORY.newXMLGregorianCalendar(date);
    this.millis = xcal.toGregorianCalendar(UTC, Locale.getDefault(), null).getTime().getTime();
    // set(date, ISO8601UTC_FORMAT);
}