1234567891011121314151617 |
- var formatDate = function (date) {
- var date = getDate(date);
- var year = date.getFullYear()
- var month = date.getMonth() + 1
- var day = date.getDay()
- var h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- var m = date.getMinutes();
- m = m < 10 ? ('0' + m) : m;
- var s = date.getSeconds();
- s = s < 10 ? ('0' + s) : s;
- return year + '/' + month + '/' + day + " " + h + ":" + m + ":" + s;
- }
- module.exports = {
- formatDate: formatDate
- }
|