- 博客(4)
- 收藏
- 关注
原创 获取时间的小时数的方法
方法一 LocalTime time = LocalTime.now(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH"); String hour = time.format(formatter); 方法二 GregorianCalendar calendar = new GregorianCalendar(); int hour = calendar.get(
2020-10-19 08:34:08
856
原创 html时间戳转日期
//后台--获取当前时间的时间戳 long startTime = System.currentTimeMillis(); //页面--转换成年月日时分秒 var startTime = new Date([[${startTime}]]).toLocaleString(); //换成想要的时间格式2020-10-13 10:20:21,重写 toLocaleString 方法 Date.prototype.toLocaleString = function() { return this.getFul
2020-10-15 10:29:19
884
原创 页面js时间比较
想获取一天中的8:00-17:00,用毫秒时间戳进行比较 //获取当前时间 var date = new Date(); //当前时间的时间戳(ms) 也可以用.getTime()获取时间戳 var currentdate = Math.round(new Date()); //当天8:00的时间戳 var eightClock = new Date(date.getFullYear() + "-" + month + "-" + date.getDate() +" 08:00:00").getTime
2020-10-14 09:16:34
224
原创 List<HashMap<String,Object>>转成List<实体>
List<HashMap<String,Object>> hashMapList = new ArrayList<HashMap<String,Object>>(); HashMap map=new HashMap(); map.put("id", 1); hashMapList .add(map); //有一个hashMapList ,那么如何转换成List套实体,如下: JSONArray jsonArray...
2020-10-14 09:08:37
2907
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人