Skip to content

Commit 7a564b7

Browse files
committed
add recommend filtering exclude 1 year and 2 years
1 parent 7770125 commit 7a564b7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

atcoder-problems-frontend/src/pages/UserPage/Recommendations/RecommendController.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export type RecommendOption = typeof RecommendOptions[number];
3737
const ExcludeOptions = [
3838
"Exclude",
3939
"Exclude submitted",
40+
"2 Years",
41+
"1 Year",
4042
"6 Months",
4143
"4 Weeks",
4244
"2 Weeks",

atcoder-problems-frontend/src/utils/LastSolvedTime.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { isAccepted } from "./index";
55
export const ExcludeOptions = [
66
"Exclude",
77
"Exclude submitted",
8+
"2 Years",
9+
"1 Year",
810
"6 Months",
911
"4 Weeks",
1012
"2 Weeks",
@@ -23,6 +25,10 @@ export const formatExcludeOption = (excludeOption: ExcludeOption): string => {
2325
return "Exclude problems solved in last 4 weeks";
2426
case "6 Months":
2527
return "Exclude problems solved in last 6 months";
28+
case "1 Year":
29+
return "Exclude problems solved in last 1 Year";
30+
case "2 Years":
31+
return "Exclude problems solved in last 2 Years";
2632
case "Exclude":
2733
return "Exclude all the solved problems";
2834
case "Don't exclude":
@@ -50,6 +56,10 @@ export const getMaximumExcludeElapsedSecond = (
5056
return 3600 * 24 * 28;
5157
case "6 Months":
5258
return 3600 * 24 * 180;
59+
case "1 Year":
60+
return 3600 * 24 * 365;
61+
case "2 Years":
62+
return 3600 * 24 * 365 * 2;
5363
case "Don't exclude":
5464
return 0;
5565
}

0 commit comments

Comments
 (0)