feat: a whole bunch of fixes ahead of launch
This commit is contained in:
parent
01647bf930
commit
8e54b46b6b
48 changed files with 184 additions and 140 deletions
|
@ -83,6 +83,15 @@ const filterFavourites = (collection) => {
|
|||
return collection.filter((item) => item.data.favourite);
|
||||
};
|
||||
|
||||
const isOld = (dateArg) => {
|
||||
const date = dayjs(dateArg);
|
||||
const now = dayjs();
|
||||
|
||||
const diffInYears = now.diff(date, "years");
|
||||
|
||||
return diffInYears >= 2;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
allTagCounts,
|
||||
allTags,
|
||||
|
@ -91,6 +100,7 @@ module.exports = {
|
|||
filterCatalogueTags,
|
||||
filterFavourites,
|
||||
formatDate,
|
||||
isOld,
|
||||
keys,
|
||||
limit,
|
||||
organizeByDate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue