【MapSheep】
[好记性不如烂笔头]
public static void main(String[] args) {
    Date now = new Date();
    Date endTime = new Date(now.getTime() + 1000 * 60 * 60 * 24);

    DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    // 2022-06-27
    System.out.println(dateFormat.format(now));
    //2022-06-28
    System.out.println(dateFormat.format(endTime));
}
posted on 2022-06-27 15:44  (Play)  阅读(15)  评论(0编辑  收藏  举报