Calendar cal = Calendar.getInstance();
cal.set(2019,10,11);
Date time = cal.getTime();
System.out.println("当前指定日期是:"+new SimpleDateFormat(fm).format(time));
cal.add(Calendar.DAY_OF_MONTH,-2);
cal.getTime();
System.out.println("前两天的日期是 "+new SimpleDateFormat(fm).format(cal.getTime()));

相关文章:

  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
猜你喜欢
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案