function parseDate str if str.match d s d , s d , return new Date str.replace s i, else if str.match d return new Date str.substring , str.substring , str.substring else return 时间转换发生错误 function GetAg ...
2012-06-28 15:28 0 3023 推荐指数:
function Age(status, index) { var aDate = new Date(); var thisYear = aDate.getFullYear(); var bDate ...
//通过生日计算年龄 getAge = (str) => { var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})/); if (r == null) return false; var d = new ...
...
let d = new Date(val)//生日val:1999-01-01 let t = d.getTime(d) // 转换为时间戳 var t1 = Date.parse(new Date());//获取当前时间戳 let t2 = t1 - t;//计算时间戳之差 t2 = t2 ...
<html><meta http-equiv="content-type" content="text/html;charset=utf-8"><body> 纸张 ...
参考 https://blog.csdn.net/u013746071/article/details/90903997 ...