- 博客(2)
- 收藏
- 关注
原创 js根据日期计算年龄
getByBirthday(birthday, day) { let b = birthday.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/) if (b == null) { return null } else { let month = b[3] * 1 let day = b[4] * 1 let nowY = day.getFullYear() let age =...
2021-01-29 10:52:55 243
原创 js根据身份证获取性别
static getSexById(userId) { if (userId.length === 18) { if (userId.charAt(16) >= '0' && userId.charAt(16) <= '9') { if (parseInt(userId.charAt(16)) % 2 === 0) { return 1 } else { return 0 ...
2021-01-29 10:42:44 949
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人