We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07ab261 commit ee094f8Copy full SHA for ee094f8
src/components/user/AcademicTile.tsx
@@ -16,12 +16,14 @@ export default function AcademicTile({
16
start,
17
end,
18
}: AcademicTileProps) {
19
- const today = new Date().toISOString();
20
const startDate = new Date(start);
21
const endDate = new Date(end);
22
23
function formatDate(date: Date) {
24
- return `${date.getMonth().toString().padStart(2, "0")}/${date.getFullYear()}`;
+ return date.toLocaleDateString("en-GB", {
+ month: "2-digit",
25
+ year: "numeric",
26
+ });
27
}
28
29
const label = `${formatDate(startDate)} - ${formatDate(endDate)}`;
0 commit comments