摘要: #用户时间转utc时间 public static Date convertToUtcTime(Date dt, String timeZone){ return convertToUtcTime(dt,TimeZone.getTimeZone(timeZone));} public static 阅读全文
posted @ 2023-11-28 17:49 叶落の无痕 阅读(55) 评论(0) 推荐(0) 编辑
摘要: Collections.sort(list, (a, z) -> a.compareTo(z)); 阅读全文
posted @ 2019-07-22 17:33 叶落の无痕 阅读(2172) 评论(0) 推荐(0) 编辑
摘要: 例 public class Student{ private Integer sex; private String name; } 转: [{name="XXX",sex=0}] 阅读全文
posted @ 2018-09-07 10:55 叶落の无痕 阅读(14113) 评论(0) 推荐(0) 编辑
摘要: 计算两个日期之间的差:两个变量 d1,d2例:d1="2018-05-16" , d2="2019-08-07"public static int getMonthDiff(String d1, String d2){ try { SimpleDateFormat sdf = new SimpleD 阅读全文
posted @ 2018-09-07 10:50 叶落の无痕 阅读(578) 评论(0) 推荐(0) 编辑