feat: use AI to migrate calendar and event views
This commit is contained in:
@@ -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'
|
||||
];
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user