wp
This commit is contained in:
@@ -6,17 +6,17 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
diploma "gordenko.dev/dima/qb"
|
||||
"gordenko.dev/dima/qb"
|
||||
"gordenko.dev/dima/qb/proto"
|
||||
)
|
||||
|
||||
func timeBoundsOfAggregation(since, until proto.TimeBound, groupBy diploma.GroupBy, firstHourOfDay int) (s time.Time, u time.Time) {
|
||||
func timeBoundsOfAggregation(since, until proto.TimeBound, groupBy qb.GroupBy, firstHourOfDay int) (s time.Time, u time.Time) {
|
||||
switch groupBy {
|
||||
case diploma.GroupByHour, diploma.GroupByDay:
|
||||
case qb.GroupByHour, qb.GroupByDay:
|
||||
s = time.Date(since.Year, since.Month, since.Day, 0, 0, 0, 0, time.Local)
|
||||
u = time.Date(until.Year, until.Month, until.Day, 0, 0, 0, 0, time.Local)
|
||||
|
||||
case diploma.GroupByMonth:
|
||||
case qb.GroupByMonth:
|
||||
s = time.Date(since.Year, since.Month, 1, 0, 0, 0, 0, time.Local)
|
||||
u = time.Date(until.Year, until.Month, 1, 0, 0, 0, 0, time.Local)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user