|
@ -323,27 +323,27 @@ public class OtherTest { |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void test16() { |
|
|
public void test16() { |
|
|
long s = 1642608000000L; |
|
|
// long s = 1642608000000L;
|
|
|
long e = 1642661444000L; |
|
|
// long e = 1642661444000L;
|
|
|
|
|
|
//
|
|
|
//开始时间
|
|
|
// //开始时间
|
|
|
Calendar min = Calendar.getInstance(); |
|
|
// Calendar min = Calendar.getInstance();
|
|
|
min.setTime(new Date(s)); |
|
|
// min.setTime(new Date(s));
|
|
|
min.set(Calendar.HOUR_OF_DAY, 0); |
|
|
// min.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
min.set(Calendar.MINUTE, 0); |
|
|
// min.set(Calendar.MINUTE, 0);
|
|
|
min.set(Calendar.SECOND, 0); |
|
|
// min.set(Calendar.SECOND, 0);
|
|
|
min.set(Calendar.MILLISECOND, 0); |
|
|
// min.set(Calendar.MILLISECOND, 0);
|
|
|
|
|
|
//
|
|
|
|
|
|
//
|
|
|
//结束时间
|
|
|
// //结束时间
|
|
|
Calendar max = Calendar.getInstance(); |
|
|
// Calendar max = Calendar.getInstance();
|
|
|
max.setTime(new Date(e)); |
|
|
// max.setTime(new Date(e));
|
|
|
max.set(Calendar.HOUR_OF_DAY, 0); |
|
|
// max.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
max.set(Calendar.MINUTE, 0); |
|
|
// max.set(Calendar.MINUTE, 0);
|
|
|
max.set(Calendar.SECOND, 0); |
|
|
// max.set(Calendar.SECOND, 0);
|
|
|
max.set(Calendar.MILLISECOND, 0); |
|
|
// max.set(Calendar.MILLISECOND, 0);
|
|
|
|
|
|
//
|
|
|
System.out.println(max.after(min)); |
|
|
// System.out.println(max.after(min));
|
|
|
|
|
|
|
|
|
//
|
|
|
//
|
|
|
// System.out.println("开始日期" + new SimpleDateFormat("yyyy-MM-dd").format(min.getTime()));
|
|
|
// System.out.println("开始日期" + new SimpleDateFormat("yyyy-MM-dd").format(min.getTime()));
|
|
@ -406,7 +406,8 @@ public class OtherTest { |
|
|
// return holidays;
|
|
|
// return holidays;
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(Integer.MAX_VALUE); |
|
|
|
|
|
System.out.println(Long.MAX_VALUE); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|