mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-01-18 06:40:27 +00:00
Swapped start and end date for time of day.
This commit is contained in:
@@ -158,10 +158,10 @@ func GetPlatform(startDate, endDate time.Time) *pirsch.VisitorStats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetVisitorTimeOfDay(startDate, endDate time.Time) []pirsch.TimeOfDayVisitors {
|
func GetVisitorTimeOfDay(startDate, endDate time.Time) []pirsch.TimeOfDayVisitors {
|
||||||
max := startDate.Add(time.Hour * 24 * 7)
|
min := endDate.Add(-time.Hour * 24 * 7)
|
||||||
|
|
||||||
if endDate.After(max) {
|
if startDate.Before(min) {
|
||||||
endDate = max
|
startDate = min
|
||||||
}
|
}
|
||||||
|
|
||||||
visitors, err := analyzer.TimeOfDay(&pirsch.Filter{From: startDate, To: endDate})
|
visitors, err := analyzer.TimeOfDay(&pirsch.Filter{From: startDate, To: endDate})
|
||||||
|
|||||||
Reference in New Issue
Block a user