时间转换
踩坑小能手hhh
今夜星光闪闪
展开
-
jq 获取最近几天时间
`` function getDay(day){ var today = new Date(); var targetday_milliseconds=today.getTime() + 1000606024day; today.setTime(targetday_milliseconds); var tYear = today.getFullYear(); var tMonth = today.getMonth(); var tDate = today.getDate(); tMonth = doHand原创 2020-09-15 14:08:48 · 168 阅读 · 0 评论 -
前端时间格式2020-02-11T12:24:18.000+0000转化成正常格式
function renderTime(date) { var dateee = new Date(date).toJSON(); return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ’ ').replace(/.[\d]{3}Z/, ‘’) } 转化成功为: 2020-02-11 12:24:18转载 2020-08-12 11:21:06 · 2086 阅读 · 1 评论