JS 日期封装操作
/**
* 字符串转化为日期对象======》 调用格式为:str.format2Date("yyyy-MM-dd hh:mm:ss")
* @param {str} 传入特殊格式
* @return {Date}
* */
String.prototype.format2Date = function(style, option) {
if (style) {
let y = style.match("[Yy]{2,4}");
let M = style..
原创
2020-10-22 19:11:01 ·
444 阅读 ·
0 评论