add dateFilter.ts

This commit is contained in:
Timi
2026-10-22 15:16:53 +08:00
parent bba4a2d4d6
commit d31441481e
14 changed files with 48 additions and 132 deletions
+5 -11
View File
@@ -1,16 +1,10 @@
import { Time } from "timi-web";
/** 日期筛选器支持的预设范围。 */
export type DateFilterPreset =
| "all"
| "today"
| "yesterday"
| "thisWeek"
| "lastWeek"
| "thisMonth"
| "lastMonth"
| "last7"
| "last30";
/** 常规列表日期筛选类型。 */
export type DateFilterType = "today" | "yesterday" | "thisWeek" | "thisMonth" | "lastMonth" | "all" | "custom";
/** 日期范围计算支持的预设类型。 */
export type DateFilterPreset = Exclude<DateFilterType, "custom"> | "lastWeek" | "last7" | "last30";
/** 日期时间范围,文本格式为 YYYY-MM-DD HH:mm。 */
export type DateTimeRange = [string, string];