Skip to content

Commit 5cbb8d2

Browse files
Add last 2 years, last 3 years to the Date Range list
1 parent 55fa213 commit 5cbb8d2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

client/app/components/dynamic-parameters/DateRangeParameter.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ const DYNAMIC_DATE_OPTIONS = [
7171
value: getDynamicDateRangeFromString("d_last_12_months"),
7272
label: null,
7373
},
74+
{
75+
name: "Last 2 years",
76+
value: getDynamicDateRangeFromString("d_last_2_years"),
77+
label: null,
78+
},
79+
{
80+
name: "Last 3 years",
81+
value: getDynamicDateRangeFromString("d_last_3_years"),
82+
label: null,
83+
},
7484
{
7585
name: "Last 10 years",
7686
value: getDynamicDateRangeFromString("d_last_10_years"),

client/app/services/parameters/DateRangeParameter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ const DYNAMIC_DATE_RANGES = {
9090
name: "Last 12 months",
9191
value: untilNow(() => moment().subtract(12, "months").startOf("day")),
9292
},
93+
last_2_years: {
94+
name: "Last 2 years",
95+
value: untilNow(() => moment().subtract(2, "years").startOf("day")),
96+
},
97+
last_3_years: {
98+
name: "Last 3 years",
99+
value: untilNow(() => moment().subtract(3, "years").startOf("day")),
100+
},
93101
last_10_years: {
94102
name: "Last 10 years",
95103
value: untilNow(() => moment().subtract(10, "years").startOf("day")),

0 commit comments

Comments
 (0)