@@ -1,10 +1,10 @@
|
||||
import dayjs from "./day";
|
||||
const range = {
|
||||
Today: [dayjs(), dayjs()],
|
||||
"Last 14 days": [dayjs().subtract(14, "days"), dayjs()],
|
||||
"Last 7 days": [dayjs().subtract(7, "days"), dayjs()],
|
||||
"Next 7 days": [dayjs(), dayjs().add(7, "days")],
|
||||
"Next 14 days": [dayjs(), dayjs().add(14, "days")],
|
||||
"Last 14 days": [dayjs().subtract(14, "day"), dayjs()],
|
||||
"Last 7 days": [dayjs().subtract(7, "day"), dayjs()],
|
||||
"Next 7 days": [dayjs(), dayjs().add(7, "day")],
|
||||
"Next 14 days": [dayjs(), dayjs().add(14, "day")],
|
||||
"Last Month": [
|
||||
dayjs().startOf("month").subtract(1, "month"),
|
||||
dayjs().startOf("month").subtract(1, "month").endOf("month"),
|
||||
@@ -15,13 +15,13 @@ const range = {
|
||||
dayjs().startOf("month").add(1, "month").endOf("month"),
|
||||
],
|
||||
"Last Quarter": [
|
||||
dayjs().startOf("quarter").subtract(1, "quarters"),
|
||||
dayjs().startOf("quarter").subtract(1, "quarter"),
|
||||
dayjs().startOf("quarter").subtract(1, "day"),
|
||||
],
|
||||
"This Quarter": [
|
||||
dayjs().startOf("quarter"),
|
||||
dayjs().startOf("quarter").add(1, "quarter").subtract(1, "day"),
|
||||
],
|
||||
"Last 90 Days": [dayjs().add(-90, "days"), dayjs()],
|
||||
"Last 90 Days": [dayjs().add(-90, "day"), dayjs()],
|
||||
};
|
||||
export default range;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import dayjsBusinessDays from "dayjs-business-days2";
|
||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
||||
import updateLocale from 'dayjs/plugin/updateLocale';
|
||||
@@ -30,6 +31,7 @@ import isYesterday from 'dayjs/plugin/isYesterday';
|
||||
import objectSupport from 'dayjs/plugin/objectSupport';
|
||||
import toArray from 'dayjs/plugin/toArray';
|
||||
import toObject from 'dayjs/plugin/toObject';
|
||||
|
||||
// import badMutable from 'dayjs/plugin/badMutable';
|
||||
// import preParsePostFormat from 'dayjs/plugin/preParsePostFormat';
|
||||
|
||||
@@ -42,7 +44,6 @@ dayjs.extend(isYesterday);
|
||||
dayjs.extend(isTomorrow);
|
||||
dayjs.extend(isToday);
|
||||
dayjs.extend(localeData);
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(quarterOfYear);
|
||||
dayjs.extend(localizedFormat);
|
||||
// dayjs.extend(preParsePostFormat); // TODO: This should not be needed
|
||||
@@ -57,6 +58,7 @@ dayjs.extend(calendar);
|
||||
dayjs.extend(arraySupport);
|
||||
dayjs.extend(advancedFormat);
|
||||
dayjs.extend(duration);
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(pluralGetSet);
|
||||
dayjs.extend(customParseFormat);
|
||||
dayjs.extend(utc);
|
||||
|
||||
Reference in New Issue
Block a user