udpate
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export type ListTimeType = 'today' | 'yesterday' | 'week' | 'month' | 'custom'
|
||||
export type ListTimeType = 'all' | 'today' | 'yesterday' | 'week' | 'month' | 'custom'
|
||||
|
||||
export function formatYmd(d: Date): string {
|
||||
const y = d.getFullYear()
|
||||
@@ -12,6 +12,8 @@ export function resolveListTimeRange(timeType: ListTimeType, dateRange: string[]
|
||||
const today = formatYmd(new Date())
|
||||
|
||||
switch (timeType) {
|
||||
case 'all':
|
||||
return ['', '']
|
||||
case 'yesterday': {
|
||||
const d = new Date()
|
||||
d.setDate(d.getDate() - 1)
|
||||
|
||||
Reference in New Issue
Block a user