标签:junit oid log warning iss sys mis class code
1 import java.text.SimpleDateFormat; 2 import java.util.Date; 3 4 import org.junit.Test; 5 6 public class IMISSYOU { 7 @SuppressWarnings("deprecation") 8 @Test 9 public void OurTime(){ 10 Date IMEETYOU = new Date(2016, 9, 30) ; 11 Date IMISSYOU = new Date(2017,4,10); 12 Date IMissYOU = new Date(2017,6,6); 13 14 SimpleDateFormat sf = new SimpleDateFormat("yy-MM-dd"); 15 16 long TIMETWO = countDay(IMissYOU,IMEETYOU); 17 18 System.out.println("IMEETYOU : "+sf.format(IMEETYOU)); 19 System.out.println("IMISSYOU : "+sf.format(IMISSYOU)); 20 System.out.println("IMissYOU : "+TIMETWO+" DAY"); 21 } 22 23 public long countDay(Date time1,Date time2){ 24 long day=(time1.getTime()-time2.getTime())/(1000 * 60 * 60 * 24); 25 return day; 26 } 27 }
标签:junit oid log warning iss sys mis class code
原文地址:http://www.cnblogs.com/iwilwaityouforever/p/7126218.html