v1.3.0 - add Annual/Quarter/Hourly timeline views

This commit is contained in:
LINING-PC\lining
2025-09-12 16:41:32 +08:00
parent bb0a00ad05
commit 281c2d9c5b
27 changed files with 4253 additions and 454 deletions
+12
View File
@@ -2,6 +2,18 @@
* 前置任务工具函数
*/
/**
* 创建本地日期对象,避免时区问题
* @param dateString 日期字符串,格式为 YYYY-MM-DD
* @returns 本地日期对象
*/
export function createLocalDate(dateString: string): Date | null {
if (!dateString) return null
const [year, month, day] = dateString.split('-').map(Number)
return new Date(year, month - 1, day)
}
/**
* 获取任务的前置任务ID数组
* @param predecessor 前置任务字段,可能是数组、字符串或空