List of usage examples for javax.xml.datatype XMLGregorianCalendar setSecond
public abstract void setSecond(int second);
From source file:org.techytax.util.DateHelper.java
public static XMLGregorianCalendar getDateForXml(Date date) { XMLGregorianCalendar calendar = null; try {//from w w w. j av a2 s. co m calendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(); } catch (DatatypeConfigurationException e) { e.printStackTrace(); } calendar.setDay(getDay(date)); calendar.setMonth(getMonth(date) + 1); calendar.setYear(getYear(date)); calendar.setHour(0); calendar.setMinute(0); calendar.setSecond(0); return calendar; }