Humanize returns a slightly more human-friendly representation of the schedule.
()
| 152 | // Humanize returns a slightly more human-friendly representation of the |
| 153 | // schedule. |
| 154 | func (s Schedule) Humanize() string { |
| 155 | var sb strings.Builder |
| 156 | _, _ = sb.WriteString(s.Time()) |
| 157 | _, _ = sb.WriteString(" ") |
| 158 | _, _ = sb.WriteString(s.DaysOfWeek()) |
| 159 | _, _ = sb.WriteString(" (") |
| 160 | _, _ = sb.WriteString(s.Location().String()) |
| 161 | _, _ = sb.WriteString(")") |
| 162 | return sb.String() |
| 163 | } |
| 164 | |
| 165 | // Location returns the IANA location for the schedule. |
| 166 | func (s Schedule) Location() *time.Location { |
no test coverage detected