MCPcopy Create free account
hub / github.com/github/gh-aw / parseDailyAround

Method parseDailyAround

pkg/parser/schedule_parser.go:403–414  ·  view source on GitHub ↗
(hasWeekdaysSuffix bool)

Source from the content-addressed store, hash-verified

401}
402
403func (p *ScheduleParser) parseDailyAround(hasWeekdaysSuffix bool) (string, error) {
404 timeStr, err := p.extractTimeWithWeekdays(2, hasWeekdaysSuffix)
405 if err != nil {
406 return "", err
407 }
408
409 minute, hour := parseTime(timeStr)
410 if hasWeekdaysSuffix {
411 return fmt.Sprintf("FUZZY:DAILY_AROUND_WEEKDAYS:%s:%s * * *", hour, minute), nil
412 }
413 return fmt.Sprintf("FUZZY:DAILY_AROUND:%s:%s * * *", hour, minute), nil
414}
415
416func (p *ScheduleParser) parseHourlyBase(hasWeekdaysSuffix bool) (string, error) {
417 scheduleLog.Printf("Parsing hourly schedule: weekdays=%v", hasWeekdaysSuffix)

Callers 1

parseDailyBaseMethod · 0.95

Calls 2

parseTimeFunction · 0.85

Tested by

no test coverage detected