hasWeekdaysSuffix checks if "on weekdays" is present at the end of tokens
()
| 568 | |
| 569 | // hasWeekdaysSuffix checks if "on weekdays" is present at the end of tokens |
| 570 | func (p *ScheduleParser) hasWeekdaysSuffix() bool { |
| 571 | if len(p.tokens) < 2 { |
| 572 | return false |
| 573 | } |
| 574 | // Check if the last two tokens are "on" and "weekdays" |
| 575 | return p.tokens[len(p.tokens)-2] == "on" && p.tokens[len(p.tokens)-1] == "weekdays" |
| 576 | } |
| 577 | |
| 578 | // extractTimeWithWeekdays extracts time specification, handling optional "on weekdays" suffix |
| 579 | func (p *ScheduleParser) extractTimeWithWeekdays(startPos int, hasWeekdaysSuffix bool) (string, error) { |
no outgoing calls
no test coverage detected