MCPcopy Index your code
hub / github.com/coder/coder / Humanize

Method Humanize

coderd/schedule/cron/cron.go:154–163  ·  view source on GitHub ↗

Humanize returns a slightly more human-friendly representation of the schedule.

()

Source from the content-addressed store, hash-verified

152// Humanize returns a slightly more human-friendly representation of the
153// schedule.
154func (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.
166func (s Schedule) Location() *time.Location {

Callers 1

postUserMethod · 0.45

Calls 5

TimeMethod · 0.95
DaysOfWeekMethod · 0.95
LocationMethod · 0.95
WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected