@Deprecated @Override public void setMonth(int month) { assertNotFrozen(); super.setMonth(month); }
/** * Sets the month of this date to the specified value. This * <tt>Date</tt> object is modified so that it represents a point * in time within the specified month, with the year, date, hour, * minute, and second the same as before, as interpreted in the * local time zone. If the date was October 31, for example, and * the month is set to June, then the new date will be treated as * if it were on July 1, because June has only 30 days. * * @param month the month value between 0-11. * @see java.util.Calendar * @deprecated As of JDK version 1.1, * replaced by <code>Calendar.set(Calendar.MONTH, int month)</code>. */ public void setMonth(int month) { super.setMonth(month); makeDirty(); }
java.sql.Date date = new java.sql.Date(0); date.setDate(cal.get(Calendar.DAY_OF_MONTH)); date.setMonth(cal.get(Calendar.MONTH)); date.setYear(cal.get(Calendar.YEAR)-1900); value = new Date(date.getTime());