2023-07-04 17:43:07 +00:00
|
|
|
// helper
|
|
|
|
import { renderDateFormat } from "helpers/date-time.helper";
|
|
|
|
|
2023-08-24 14:15:23 +00:00
|
|
|
export const DATE_FILTER_OPTIONS = [
|
2023-07-04 17:43:07 +00:00
|
|
|
{
|
|
|
|
name: "Last week",
|
|
|
|
value: [
|
|
|
|
`${renderDateFormat(new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000))};after`,
|
|
|
|
`${renderDateFormat(new Date())};before`,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "2 weeks from now",
|
|
|
|
value: [
|
|
|
|
`${renderDateFormat(new Date())};after`,
|
|
|
|
`${renderDateFormat(new Date(new Date().getTime() + 14 * 24 * 60 * 60 * 1000))};before`,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "1 month from now",
|
|
|
|
value: [
|
|
|
|
`${renderDateFormat(new Date())};after`,
|
|
|
|
`${renderDateFormat(
|
|
|
|
new Date(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate())
|
|
|
|
)};before`,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "2 months from now",
|
|
|
|
value: [
|
|
|
|
`${renderDateFormat(new Date())};after`,
|
|
|
|
`${renderDateFormat(
|
|
|
|
new Date(new Date().getFullYear(), new Date().getMonth() + 2, new Date().getDate())
|
|
|
|
)};before`,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|