Skip to content

Commit

Permalink
🦄 refactor:
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristYoung committed Oct 30, 2023
1 parent 99f34d8 commit 58efe72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/filter.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ export interface FilterWordsType {
// range?: [number, number]; // Tuple Type.
startRange?: number;
endRange?: number;
timeFilter?: 'last_7d' | 'last_30d' | 'last_90d';
timeFilter?: -7 | -30 | -90;
familiarFilter?: 'all' | 'only_familiar' | 'only_unfamiliar';
}
4 changes: 4 additions & 0 deletions src/utils/date.util.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export function getDateString(): number {
return new Date().getTime();
}

export function getXDaysAgoOrAfterTime(x: number): number {
return new Date(new Date().getTime() + x * 24 * 60 * 60 * 1000).getTime();
}

0 comments on commit 58efe72

Please sign in to comment.