fix Time call
This commit is contained in:
+2
-2
@@ -60,7 +60,7 @@ export function buildPresetDateRange(type: DateFilterPreset, now = new Date()):
|
||||
const begin = new Date(end);
|
||||
begin.setDate(begin.getDate() - (type === "last7" ? 6 : 29));
|
||||
begin.setHours(0, 0, 0, 0);
|
||||
return [Time.formatDateTime(begin), Time.formatDateTime(end)];
|
||||
return [Time.toDateTime(begin), Time.toDateTime(end)];
|
||||
}
|
||||
|
||||
const date = getDateStart(now);
|
||||
@@ -91,7 +91,7 @@ export function parseDateTime(value: string, isEnd: boolean): Date {
|
||||
}
|
||||
|
||||
function buildDayRange(begin: Date, end: Date): DateTimeRange {
|
||||
return [`${Time.formatDate(begin)} 00:00`, `${Time.formatDate(end)} 23:59`];
|
||||
return [`${Time.toDate(begin)} 00:00`, `${Time.toDate(end)} 23:59`];
|
||||
}
|
||||
|
||||
function getDateStart(date: Date): Date {
|
||||
|
||||
Reference in New Issue
Block a user