/**
* 获取昨日日期
*
* @return
*/
public String getYesterday(int i) {
Calendar c = Calendar.getInstance();
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH, i);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
return formatter.format(c.getTime());
}
获取昨日日期
最新推荐文章于 2024-09-19 19:41:13 发布