Create periods of Time. Normalize them for custom calculations.
go get github.com/andrelugomes/time-periods
import "github.com/andrelugomes/time-periods/periods"
period := Period{
time.Date(2020, 01, 02, 11, 0, 0, 0, time.UTC),
time.Date(2020, 01, 06, 0, 0, 0, 0, time.UTC),
}
periods := []Period{p1,p2}
uniques := Normalize(periods)
comparison := Comparison{first, second}
comparison.Is...