Skip to content

Commit

Permalink
Merge pull request #76 from buildingu/chore-fix-dateFormatting
Browse files Browse the repository at this point in the history
fix with math.abs
  • Loading branch information
Sidragon123 authored Jan 19, 2025
2 parents ba64d43 + ef02a5f commit 8aff5dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/src/Utility/DateFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function formatCreatedAt(createdAt) {
const timezoneOffset = createdDate.getTimezoneOffset();
createdDate.setMinutes(createdDate.getMinutes() - timezoneOffset);

const diffTime = Math.Abs(now - createdDate);
const diffTime = Math.abs(now - createdDate);
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));

const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
Expand Down

0 comments on commit 8aff5dd

Please sign in to comment.