Skip to content

Commit

Permalink
fixLemmyDateString() used
Browse files Browse the repository at this point in the history
  • Loading branch information
sharunkumar committed Oct 5, 2023
1 parent 6fd4353 commit 1f3f27a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/labels/links/PersonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Handle from "../Handle";
import { StyledLink } from "./shared";
import { useAppSelector } from "../../../store";
import { OInstanceUrlDisplayMode } from "../../../services/db";
import { fixLemmyDateString } from "../../../helpers/date";

const Prefix = styled.span`
font-weight: normal;
Expand Down Expand Up @@ -44,7 +45,7 @@ export default function PersonLink({
else if (opId && person.id === opId) color = "var(--ion-color-primary-fixed)";

const today = new Date();
const cakeDate = new Date(person.published);
const cakeDate = new Date(fixLemmyDateString(person.published));
const isCakeDay =
today.getDate() === cakeDate.getDate() &&
today.getMonth() === cakeDate.getMonth();
Expand Down

0 comments on commit 1f3f27a

Please sign in to comment.