朱丽叶

导航

2022年8月14日 #

根据时间戳格格式化字符转(dddd-mm-dd )

摘要: export function getDateTime(value) { var b = new Date(value); var year = b.getFullYear()+'-'; var month = (b.getMonth()+1); var date = b.getDate(); if 阅读全文

posted @ 2022-08-14 19:40 朱丽叶 阅读(54) 评论(0) 推荐(0)

数组根据时间戳排序

摘要: export function compare(arr, key, type = "asc") { return arr.sort((value1, value2) => { const val1 = value1[key]; const val2 = value2[key]; // return 阅读全文

posted @ 2022-08-14 19:33 朱丽叶 阅读(139) 评论(0) 推荐(0)