摘要:
/* * @author * 2005-12-14 */ Calendar calendar = Calendar.getInstance(); //getTime()方法是取得当前的日期,其返回值是一个java.util.Date类的对象 res.setResOpenDate(calendar.getTime()); int day = calendar.get(Calendar.DAY_OF_YEAR); calendar.set(Calendar.DAY_OF_YEAR, day + 30); //投票的有效期30天 res.setResEndDate(calendar.g... 阅读全文