Skip to content

Commit 6b904a1

Browse files
committed
little fix
1 parent e1541d7 commit 6b904a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cubejs-api-gateway/src/dateParser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export function dateParser(dateString, timezone, now = new Date()) {
6565
moment.tz(timezone).endOf('day').add(1, 'day')
6666
];
6767
} else if (dateString.match(/^from (.*) to (.*)$/)) {
68-
const [, from, to] = dateString.match(/^from(.{0,50})to(.{0,50})$/);
68+
let [, from, to] = dateString.match(/^from(.{0,50})to(.{0,50})$/);
69+
from = from.trim();
70+
to = to.trim();
6971

7072
const current = moment(now).tz(timezone);
7173
const fromResults = parse(from.trim(), new Date(current.format(moment.HTML5_FMT.DATETIME_LOCAL_MS)));

0 commit comments

Comments
 (0)