Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: 🐛 adjust term date rows for 2023+
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy committed Jan 31, 2024
1 parent dc7ca55 commit de27c05
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions libs/uc-irvine-api/src/registrar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,23 @@ export async function getTermDateData(year: string): Promise<Record<string, Quar
);

addSingleDateRow(quarterData, 2, "instructionStart", ret, year);
addSingleDateRow(quarterData, 17, "instructionEnd", ret, year);
addMultipleDateRow(quarterData, 18, "finalsStart", "finalsEnd", ret, year);
// After the 2022-23 academic year, the dates for the end of instruction and the final examinations period was shifted up by one row.
// This change accounts for the difference in table row numbering caused by this change.
addSingleDateRow(
quarterData,
17 - Number(Number.parseInt(year, 10) > 2022),
"instructionEnd",
ret,
year,
);
addMultipleDateRow(
quarterData,
18 - Number(Number.parseInt(year, 10) > 2022),
"finalsStart",
"finalsEnd",
ret,
year,
);
addSingleDateRow(
summerSessionData,
// Before the 2021-22 academic year, Juneteenth was either not observed or observed during one of the Summer Sessions.
Expand Down

0 comments on commit de27c05

Please sign in to comment.