feat: use AI to migrate calendar and event views

This commit is contained in:
2026-07-09 16:59:00 +08:00
parent e6fc06c0f9
commit 0f674d0483
12 changed files with 1276 additions and 24 deletions
+8
View File
@@ -0,0 +1,8 @@
export const MONTH_NAMES: string[] = [
'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December'
];
export const WEEK_NAMES: string[] = [
'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'
];
+1 -1
View File
@@ -451,7 +451,7 @@ type DayInMonthInfo = [
weeksBackwardDayOfWeek: number,
];
function getDayInMonth(year: number, month: number, day: number): DayInMonthInfo {
export function getDayInMonth(year: number, month: number, day: number): DayInMonthInfo {
const days = MONTH_DAY_COUNT[month - 1]! + ((month == 2 && isLeapYear(year)) ? 1 : 0);
const firstDayOfWeek = dayOfWeek(year, month, 1);
const bilateralDayOfWeek = (firstDayOfWeek + day - 1) % 7;