司机管理模块,开票通知模块

This commit is contained in:
2023-08-18 14:52:29 +08:00
parent 1a119820dd
commit 90e3353058
17 changed files with 701 additions and 232 deletions

View File

@ -22,9 +22,23 @@ const leftCopy = (obj, source) => {
}
}
const timeFormat=(data) =>{
const currentDate = new Date(data);
const year = currentDate.getFullYear();
const month = String(currentDate.getMonth() + 1).padStart(2, '0');
const day = String(currentDate.getDate()).padStart(2, '0');
const hours = String(currentDate.getHours()).padStart(2, '0');
const minutes = String(currentDate.getMinutes()).padStart(2, '0');
const seconds = String(currentDate.getSeconds()).padStart(2, '0');
const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
// console.log("formattedDate",formattedDate)
return formattedDate;
}
module.exports = {
formatNumber,
formatDate,
leftCopy,
timeFormat
}