Add 3-Day Outlook generation

This commit is contained in:
2026-05-29 18:08:50 +00:00
parent 19513e42c1
commit 4c9d396f9b
24 changed files with 927 additions and 78 deletions

View File

@@ -24,6 +24,21 @@ func (p Period) Contains(t time.Time) bool {
return !t.Before(p.Start) && t.Before(p.End)
}
func (p Period) Intersection(other Period) (Period, bool) {
if !p.Overlaps(other) {
return Period{}, false
}
start := p.Start
if other.Start.After(start) {
start = other.Start
}
end := p.End
if other.End.Before(end) {
end = other.End
}
return Period{Start: start, End: end}, true
}
func ParseClock(value string) (time.Duration, error) {
parts := strings.Split(value, ":")
if len(parts) != 2 {