已经早解决了!!用我的那个方法!只是不知道还可以这样!学习一次下..
GregorianCalendar gc=new GregorianCalendar(); gc.setTime(new Date); gc.add(1,-1)表示年份减一. gc.add(2,-1)表示月份减一. gc.add(3.-1)表示周减一. gc.add(5,-1)表示天减一.
前面需要你添加你的Date gc.setTime(new Date);
51,409
社区成员
86,078
社区内容
加载中
试试用AI创作助手写篇文章吧