package main import ( "encoding/csv" "fmt" "io" "os" "slices" "strconv" "strings" "time" "github.com/therootcompany/golib/time/calendar" ) // ---------- 1. Data structures for a row ---------- type Rule struct { Event string Nth int // 0 = fixed day of month, -1 = last, … (same semantics as GetNthWeekday) Weekday time.Weekday // ignored when Nth == 0 FixedDay int // used only when Nth == 0 (e.g. “15” for the 15th) TimeOfDay string // HH:MM in the event’s local zone (e.g. "19:00") Location *time.Location Reminders []Reminder } type DayType int var dayTypes = []string{"Weekdays", "Federal Workdays", "Bank Workdays", "Business Days"} func (d DayType) String() string { return dayTypes[d] } const ( WEEK DayType = iota FEDERAL BANK BUSINESS ) // format is either "