[Java] 纯文本查看 复制代码 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
long time = System.currentTimeMillis();
Date date = new Date(time);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, +400);
date = cal.getTime();
System.out.println( sdf.format(date)); |