Skip to content

Commit 6c81a02

Browse files
committed
fix: Yesterday date range doesn't work
1 parent f1346da commit 6c81a02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-api-gateway/dateParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = (dateString) => {
2626
momentRange = [moment().startOf('day'), moment().endOf('day')];
2727
} else if (dateString.match(/yesterday/)) {
2828
const yesterday = moment().add(-1, 'day');
29-
momentRange = [yesterday.startOf('day'), yesterday.endOf('day')];
29+
momentRange = [moment(yesterday).startOf('day'), moment(yesterday).endOf('day')];
3030
} else {
3131
const results = chrono.parse(dateString);
3232
if (!results) {

0 commit comments

Comments
 (0)