小记1:【传入时间戳,判断时间是否在30分钟以内】 public static boolean isEffectiveDate(Long time) { Long setTime= Long.valueOf(1000*60*30);//1秒*60*30 Date date= new Date(); return date.getTime()-time<=setTime && date.getTime()>time; }