Skip to content

Commit

Permalink
Update FilterMenu.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Siilwyn authored Sep 5, 2023
1 parent aaab53d commit 84b826b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/FilterMenu/FilterMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ function getRelativeTimeString(date: Date): string {
const units: Intl.RelativeTimeFormatUnit[] = ["second", "minute", "hour"];
const unitIndex = cutoffs.findIndex(cutoff => cutoff > Math.abs(deltaSeconds));
// Get the divisor to divide from the seconds. E.g. if our unit is "day" our divisor
// is one day in seconds, so we can divide our seconds by this to get the # of days
// Get the divisor to divide from the seconds.
const divisor = unitIndex ? cutoffs[unitIndex - 1] : 1;
const rtf = new Intl.RelativeTimeFormat($locale.value, { numeric: "auto" });
Expand Down

0 comments on commit 84b826b

Please sign in to comment.