Closed tisonkun closed 1 month ago
For DayOfWeek, it seems:
NearestWeekday, LastDayOfWeek, NthDayOfWeek can occur on single item, but never in range or step. *
can never occur in range (1-*
is invalid).
So typically, we'd implement it as:
Then we can see how to parametize these.
Determinate and finalize these two things:
https://github.com/tisonkun/cronexpr/blob/21bbfb1749854c931b9f1637168ce68d89e795bd/src/lib.rs#L79-L84
https://github.com/tisonkun/cronexpr/blob/21bbfb1749854c931b9f1637168ce68d89e795bd/src/parser.rs#L204-L206
This might lightly rework the parsing logics and matching logics. While the user interfaces should not be changed and only new inputs are accepted, I'd leave a few time to see if we can do this nontrivial rework before 1.0.