func (s Span) Contains(r Span) bool {
	return s.ContainsTime(r.start) && s.ContainsTime(r.end)
}
Contains reports whether r is entirely within s.
package timespan
import (
	"time"
)
type Span struct {
	start, end time.Time
}
func New(t time.Time, d time.Duration) Span {
	start := t
	end := t.Add(d)
	if end.Before(t) {
		start, end = end, start
	}
	return Span{
		start: start,
		end:   end,
	}
}
func (s Span) Start() time.Time {
	return s.start
}
func (s Span) End() time.Time {
	return s.end
}
func (s Span) Duration() time.Duration {
	return s.end.Sub(s.start)
}
func (s Span) After(t time.Time) bool {
	return s.start.After(t)
}
func (s Span) Before(t time.Time) bool {
	return s.end.Before(t)
}
func (s Span) Borders(r Span) bool {
	return s.start.Equal(r.end) || s.end.Equal(r.start)
}
func (s Span) ContainsTime(t time.Time) bool {
	return !(t.Before(s.start) || t.After(s.end))
}