@lightdash/common 0.1428.6 → 0.1428.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -307,20 +307,11 @@ const getDefaultMetricTreeNodeDateRange = (timeFrame) => {
|
|
307
307
|
now.endOf('day').subtract(1, 'day').toDate(),
|
308
308
|
];
|
309
309
|
case timeFrames_1.TimeFrames.WEEK:
|
310
|
-
return [
|
311
|
-
now.startOf('isoWeek').subtract(1, 'week').toDate(),
|
312
|
-
now.endOf('isoWeek').subtract(1, 'week').toDate(),
|
313
|
-
];
|
310
|
+
return [now.startOf('isoWeek').toDate(), now.toDate()];
|
314
311
|
case timeFrames_1.TimeFrames.MONTH:
|
315
|
-
return [
|
316
|
-
now.startOf('month').subtract(1, 'month').toDate(),
|
317
|
-
now.endOf('month').subtract(1, 'month').toDate(),
|
318
|
-
];
|
312
|
+
return [now.startOf('month').toDate(), now.toDate()];
|
319
313
|
case timeFrames_1.TimeFrames.YEAR:
|
320
|
-
return [
|
321
|
-
now.startOf('year').subtract(1, 'year').toDate(),
|
322
|
-
now.endOf('year').subtract(1, 'year').toDate(),
|
323
|
-
];
|
314
|
+
return [now.startOf('year').toDate(), now.toDate()];
|
324
315
|
default:
|
325
316
|
return (0, exports.assertUnimplementedTimeframe)(timeFrame);
|
326
317
|
}
|