diff --git a/date_utils/date_utils.go b/date_utils/date_utils.go index 3893eff6c0ca5771ee999e8c910f5cbf24a3e1cf..66cc9832e622c56a3f2921222e077d729ef57f0d 100644 --- a/date_utils/date_utils.go +++ b/date_utils/date_utils.go @@ -436,7 +436,7 @@ func (t TradingHours) String() string { rangeDescription = fmt.Sprintf("%s – %s", rangeStartWeekday.String()[:3], currentWeekday.String()[:3]) } - // If the next day has the same times and we're not at the last element, we continue the current range + // If the next day has the same times, and we're not at the last element, we continue the current range. if nextTradingHoursDay.StartTime == currentTradingHoursDay.StartTime && nextTradingHoursDay.EndTime == currentTradingHoursDay.EndTime && i < len(weekdays)-1 { continue } @@ -477,3 +477,9 @@ func (day TradingHoursDay) String() string { return startTime.Format("3:04pm") + " – " + endTime.Format("3:04pm") } + +const DurationFifteenMinutes = time.Minute * 15 + +const DurationOneDay = time.Hour * 24 + +const DurationOneWeek = DurationOneDay * 7