Code example for GregorianCalendar

Methods: setTimeInMillis

    public static XMLGregorianCalendar asXMLGregorianCalendar(java.util.Date date) {
        if (date == null) {
            return null; 
        } else { 
            GregorianCalendar gc = new GregorianCalendar();
            return df.newXMLGregorianCalendar(gc);
     * Converts an XMLGregorianCalendar to an instance of java.util.Date 
     * @param xgc Instance of XMLGregorianCalendar or a null reference 
     * @return java.util.Date instance whose value is based upon the 
     *  value in the xgc parameter. If the xgc parameter is null then 
     *  this method will simply return null. 
    public static java.util.Date asDate(XMLGregorianCalendar xgc) {
Stop searching for code, let great code find you!  Add Codota to your java IDE