@lightdash/common 0.1428.6 → 0.1428.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "0.1428.6",
3
+ "version": "0.1428.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [