1 2 3 4 | export function dateFormate(date, fmt){ if (new RegExp("(Y+)").test(fmt)){ let source = RegExp.$1; // YYYY let origin = date.getFullYear([......]<p class="read-more"><a href="https://www.yusian.com/blog/javascript/2018/01/25/1551051114.html">继续阅读</a></p> |
JavaScript中时间格式化方法实现
Leave a reply