Skip to content

Commit ee094f8

Browse files
committed
Fix academic dates
1 parent 07ab261 commit ee094f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/user/AcademicTile.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ export default function AcademicTile({
1616
start,
1717
end,
1818
}: AcademicTileProps) {
19-
const today = new Date().toISOString();
2019
const startDate = new Date(start);
2120
const endDate = new Date(end);
2221

2322
function formatDate(date: Date) {
24-
return `${date.getMonth().toString().padStart(2, "0")}/${date.getFullYear()}`;
23+
return date.toLocaleDateString("en-GB", {
24+
month: "2-digit",
25+
year: "numeric",
26+
});
2527
}
2628

2729
const label = `${formatDate(startDate)} - ${formatDate(endDate)}`;

0 commit comments

Comments
 (0)