/** * Converts this DateTime into a local java.util.Date. * * @return a local java.util.Date representing this DateTime. */ public java.util.Date toDate() { Calendar calendar = new GregorianCalendar(getCentury() * 100 + getYear(), getMonth() - 1, getDay(), getHour(), getMinute(), getSeconds()); calendar.set(Calendar.MILLISECOND, getMilli()); setDateFormatTimeZone(calendar); return calendar.getTime(); } // toDate()
/** * Converts this DateTime into a local java.util.Date. * @return a local java.util.Date representing this DateTime. */ public java.util.Date toDate() { Calendar calendar = new GregorianCalendar(getCentury()*100+getYear(), getMonth()-1, getDay(), getHour(), getMinute(), getSeconds()); calendar.set(Calendar.MILLISECOND, getMilli()); setDateFormatTimeZone(calendar); return calendar.getTime(); } //toDate()
/** * Returns an array of shorts with all the fields that describe this DateTime type. The order of * entries in the array is as follows: * <ul> * <li>century</li> * <li>year</li> * <li>month</li> * <li>day</li> * <li>hour</li> * <li>minute</li> * <li>second</li> * <li>millisecond</li> * </ul> * Note:the time zone is not included. * * @return an array of short with all the fields that describe this Date type. */ public short[] getValues() { short[] result = new short[8]; result[0] = this.getCentury(); result[1] = this.getYear(); result[2] = this.getMonth(); result[3] = this.getDay(); result[4] = this.getHour(); result[5] = this.getMinute(); result[6] = this.getSeconds(); result[7] = this.getMilli(); return result; } // getValues
dateTarget.setHour(temp.getHour()); dateTarget.setMinute(temp.getMinute()); dateTarget.setSecond(temp.getSeconds(), temp.getMilli()); if (temp.isUTC()) { dateTarget.setUTC();
dateTarget.setHour(temp.getHour()); dateTarget.setMinute(temp.getMinute()); dateTarget.setSecond(temp.getSeconds(), temp.getMilli()); if (temp.isUTC()) { dateTarget.setUTC();
/** * Returns an array of shorts with all the fields that describe this * DateTime type. The order of entries in the array is as follows: * <ul> * <li>century</li> * <li>year</li> * <li>month</li> * <li>day</li> * <li>hour</li> * <li>minute</li> * <li>second</li> * <li>millisecond</li> * </ul> * Note:the time zone is not included. * * @return an array of short with all the fields that describe this Date * type. */ public short[] getValues() { short[] result = new short[8]; result[0] = this.getCentury(); result[1] = this.getYear(); result[2] = this.getMonth(); result[3] = this.getDay(); result[4] = this.getHour(); result[5] = this.getMinute(); result[6] = this.getSeconds(); result[7] = this.getMilli(); return result; } //getValues