()
| 91 | } |
| 92 | |
| 93 | function* NaturalDateParser(): ParseGenerator<Result> { |
| 94 | yield whitespaceOptional; |
| 95 | const { weekdays, repeats } = yield WeekdaysParser; |
| 96 | yield whitespaceOptional; |
| 97 | |
| 98 | yield whitespaceOptional; |
| 99 | const timespan = yield optional(TimespanParser); |
| 100 | yield whitespaceOptional; |
| 101 | |
| 102 | return { repeats: repeats ? 'weekly' : undefined, weekdays, ...(timespan as any) }; |
| 103 | } |
| 104 | |
| 105 | function parseNaturalDate(input: string) { |
| 106 | input = input.toLowerCase(); |
no test coverage detected