Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (15 sloc) 414 Bytes
package main
import (
"time"
"github.com/rhnasc/nubank_api_exporter/nubank"
)
func FilterEventsByTimeRange(events []*nubank.Event, from time.Time, to time.Time) []*nubank.Event {
filteredEvents := []*nubank.Event{}
for _, event := range events {
onRange := event.Time.After(from) && event.Time.Before(to)
if onRange {
filteredEvents = append(filteredEvents, event)
}
}
return filteredEvents
}
You can’t perform that action at this time.