YYMMDD转YYYY-MM-DD

 

date.replace(/(\d{4})(\d{2})(\d{2})/g,'$1-$2-$3');

 

posted @ 2019-03-21 11:14  Nyan  阅读(512)  评论(0编辑  收藏  举报