어제 :
SimpleDateFormat의 자위대 = 새로운하여 SimpleDateFormat ( "YYYMMDD");
달력 달력은 새로운 해 GregorianCalendar를 () =;
calendar.setTime (새 Date ());
calendar.add (calendar.DATE, -1);
문자열 날짜 = sdf.format (calendar.getTime ());
에서 System.out.println ( "【定时】当前时间:"+ 날짜);
오늘 :
기간 D는 새로운 날짜 () =;
SimpleDateFormat의 자위대 = 새로운하여 SimpleDateFormat ( "YYYMMDD");
문자열 날짜 = sdf.format (d);
내일 :
SimpleDateFormat의 자위대 = 새로운하여 SimpleDateFormat ( "YYYMMDD");
달력 달력은 새로운 해 GregorianCalendar를 () =;
calendar.setTime (새 Date ());
calendar.add (calendar.DATE, 1);
문자열 날짜 = sdf.format (calendar.getTime ());
에서 System.out.println ( "【定时】当前时间:"+ 날짜);
아니면 어제
날짜 date4 새로운 날짜 = (새로운 날짜 ()를 다음 getTime () - 24 * 60 * 60 * 1000.);
문자열 시간 = sdf.format (date4);
에서 System.out.println (시간);