预算配置

This commit is contained in:
2023-02-09 22:46:38 +08:00
parent 7a7884abf5
commit 432b4f9815
8 changed files with 79 additions and 43 deletions

View File

@@ -16,6 +16,12 @@ const formatDate = date => {
return `${[year, month, day].map(formatNumber).join('-')}`
}
const formatDateMonth = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
return `${[year, month].map(formatNumber).join('-')}`
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : `0${n}`
@@ -49,5 +55,6 @@ const getToken = () => {
module.exports = {
formatTime,
formatDate,
formatDateMonth,
getToken
}