Skip to content

Commit

Permalink
Merge pull request #1079 from spencerckhuang/fix/data-last-updated-su…
Browse files Browse the repository at this point in the history
…ffix

fix: edited date last updated so that the displayed day of the month …
  • Loading branch information
JiaqiWang18 authored Feb 17, 2024
2 parents bcaf829 + 7782179 commit 5cb0c26
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions static/js/redux/ui/Semesterly.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const Semesterly = () => {
];

let dayEnding: String;
const curDay = curDate.getDay();
const curDay = curDate.getUTCDate();
if (curDay >= 11 && curDay <= 13) {
dayEnding = "th";
}
Expand All @@ -174,9 +174,7 @@ const Semesterly = () => {

const monthIndex: number = curDate.getMonth();

return `${
months[monthIndex]
} ${curDate.getUTCDate()}${dayEnding}, ${curDate.getFullYear()}`;
return `${months[monthIndex]} ${curDay}${dayEnding}, ${curDate.getFullYear()}`;
};

const mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
Expand Down

0 comments on commit 5cb0c26

Please sign in to comment.