预算配置
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user