porting - part 4 done

This commit is contained in:
2025-09-07 12:14:19 -07:00
parent 6e4b12afa7
commit ead942b122
12 changed files with 368 additions and 24 deletions

View File

@@ -143,3 +143,12 @@ func Min(a, b int) int {
}
return b
}
// DateRange generates a date range from end date backwards for n days
func DateRange(end time.Time, days int) []time.Time {
dates := make([]time.Time, days)
for i := 0; i < days; i++ {
dates[i] = end.AddDate(0, 0, -i)
}
return dates
}