中文说明
格式化日期 到 yyyy-MM-dd hh:mm:ss
形式
日期对象 传入 Date 对象
日期格式化字符串 可选
yyyy-MM-dd hh:mm:ss
格式中的任意长短组合即可,不加参数会输出全长
字符串
formatter('yyyy-MM-dd hh:mm:ss', new Date())
// 2019-03-26 18:10:12
English Description
a tool to format a date object to type of yyyy-MM-dd hh:mm:ss
date objcet date object
formatter string Optional
any of yyyy-MM-dd hh:mm:ss
will be OK
String
formatter('yyyy-MM-dd hh:mm:ss', new Date())
// 2019-03-26 18:10:12