Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, -1);
String yesterday = newSimpleDateFormat( "yyyy-MM-dd ").format(cal.getTime());
System.out.println(yesterday);
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/17919.html