Closed lemonzeng closed 3 months ago
代码中没有用到dueDate:
const getAvailability = (quiz: any) => { const currentDate = new Date(); const availableDate = new Date(quiz.availableDate); const dueDate = new Date(quiz.dueDate); const availableUntilDate = new Date(quiz.availableUntilDate); if (currentDate > availableUntilDate) { return "Closed"; } else if ( currentDate >= availableDate && currentDate <= availableUntilDate ) { return "Available"; } else if (currentDate < availableDate) { return `Not available until ${formatDate(quiz.availableDate)}`; } else { return "Closed"; } };
代码中没有用到dueDate: