推迟一周示例: Calendar curr = Calendar.getInstance(); curr.set(Calendar.DAY_OF_MONTH,curr.get(Calendar.DAY_OF_MONTH)+7); Date date=curr.getTime(); 推迟一个月示例: Calendar curr = Calendar.getInstance(); curr.set(Calendar.MONTH,curr.get(Calendar.MONTH)+1); Date date=curr.getTime(); 推迟一年示例: Calendar curr = Calendar.getInstance(); curr.set(Calendar.YEAR,curr.get(Calendar.YEAR)+1); Date date=curr.getTime();
日期推迟一周/一年/一月的实例
最新推荐文章于 2022-09-13 15:29:41 发布