java获得昨天日期可以使用Calendar类:
Date now = new Date(); Calendar cal = Calendar.getInstance(); nowCalendar.setTime(now); cal.add(Calendar.DATE, -1); Date yesterday = cal.getTime()
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/10460.html
java获得昨天日期可以使用Calendar类:
Date now = new Date(); Calendar cal = Calendar.getInstance(); nowCalendar.setTime(now); cal.add(Calendar.DATE, -1); Date yesterday = cal.getTime()
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/10460.html