feat: 秒杀时段管理

(cherry picked from commit a75720ec06)
This commit is contained in:
puhui999
2023-06-17 21:20:28 +08:00
committed by shizhong
parent b6dff5f976
commit a233d16dbb
5 changed files with 307 additions and 2 deletions

View File

@ -202,7 +202,7 @@ export const dateFormatter = (row, column, cellValue) => {
* @returns 带时间00:00:00的日期
*/
export function beginOfDay(param: Date) {
return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 0, 0, 0, 0)
return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 0, 0, 0)
}
/**
@ -211,7 +211,7 @@ export function beginOfDay(param: Date) {
* @returns 带时间23:59:59的日期
*/
export function endOfDay(param: Date) {
return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 23, 59, 59, 999)
return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 23, 59, 59)
}
/**