File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/cubejs-schema-compiler/adapter Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const UserError = require('../compiler/UserError');
6
6
7
7
const TIME_SERIES = {
8
8
day : ( range ) =>
9
- Array . from ( range . by ( 'day' ) )
9
+ Array . from ( range . snapTo ( 'day' ) . by ( 'day' ) )
10
10
. map ( d => [ d . format ( 'YYYY-MM-DDT00:00:00.000' ) , d . format ( 'YYYY-MM-DDT23:59:59.999' ) ] ) ,
11
11
month : ( range ) =>
12
12
Array . from ( range . snapTo ( 'month' ) . by ( 'month' ) )
@@ -15,13 +15,13 @@ const TIME_SERIES = {
15
15
Array . from ( range . snapTo ( 'year' ) . by ( 'year' ) )
16
16
. map ( d => [ d . format ( 'YYYY-01-01T00:00:00.000' ) , d . endOf ( 'year' ) . format ( 'YYYY-MM-DDT23:59:59.999' ) ] ) ,
17
17
hour : ( range ) =>
18
- Array . from ( range . by ( 'hour' ) )
18
+ Array . from ( range . snapTo ( 'hour' ) . by ( 'hour' ) )
19
19
. map ( d => [ d . format ( 'YYYY-MM-DDTHH:00:00.000' ) , d . format ( 'YYYY-MM-DDTHH:59:59.999' ) ] ) ,
20
20
minute : ( range ) =>
21
- Array . from ( range . by ( 'minute' ) )
21
+ Array . from ( range . snapTo ( 'minute' ) . by ( 'minute' ) )
22
22
. map ( d => [ d . format ( 'YYYY-MM-DDTHH:MM:00.000' ) , d . format ( 'YYYY-MM-DDTHH:MM:59.999' ) ] ) ,
23
23
second : ( range ) =>
24
- Array . from ( range . by ( 'second' ) )
24
+ Array . from ( range . snapTo ( 'second' ) . by ( 'second' ) )
25
25
. map ( d => [ d . format ( 'YYYY-MM-DDTHH:MM:SS.000' ) , d . format ( 'YYYY-MM-DDTHH:MM:SS.999' ) ] ) ,
26
26
week : ( range ) =>
27
27
Array . from ( range . snapTo ( 'isoweek' ) . by ( 'week' ) )
You can’t perform that action at this time.
0 commit comments