List of usage examples for javax.xml.datatype XMLGregorianCalendar setMinute
public abstract void setMinute(int minute);
From source file:org.techytax.util.DateHelper.java
public static XMLGregorianCalendar getDateForXml(Date date) { XMLGregorianCalendar calendar = null; try {//from ww w. jav a 2 s . com 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; }