Instead of rolling your own API for repetitions, I'd adopt the terminology and semantics of RFC 5545 RRULEs which is widely used within Calendaring applications
Section 3.8.5.3 Section 3.8.5.3 thoroughly documents the syntax and behavior of RRULEs (Recurrence rules). They look like
RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
which means
Weekly on Tuesday and Thursday for five weeks:
so you could implement these semantics (or find an existing RFC 5545 library that does it) and your API might look very similar to the RRULE syntax:
ctx.Run(...).Freq(WEEKLY).Count(10).ByDay(TU, TH)
Instead of rolling your own API for repetitions, I'd adopt the terminology and semantics of RFC 5545 RRULEs which is widely used within Calendaring applications
Section 3.8.5.3 thoroughly documents the syntax and behavior of RRULEs (Recurrence rules). They look like
RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
which means
Weekly on Tuesday and Thursday for five weeks:
so you could implement these semantics (or find an existing RFC 5545 library that does it) and your API might look very similar to the RRULE syntax:
ctx.Run(...).Freq(WEEKLY).Count(10).ByDay(TU, TH)
Instead of rolling your own API for repetitions, I'd adopt the terminology and semantics of RFC 5545 RRULEs which is widely used within Calendaring applications
Section 3.8.5.3 thoroughly documents the syntax and behavior of RRULEs (Recurrence rules). They look like
RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
which means
Weekly on Tuesday and Thursday for five weeks:
so you could implement these semantics (or find an existing RFC 5545 library that does it) and your API might look very similar to the RRULE syntax:
ctx.Run(...).Freq(WEEKLY).Count(10).ByDay(TU, TH)
Instead of rolling your own API for repetitions, I'd adopt the terminology and semantics of RFC 5545 RRULEs which is widely used within Calendaring applications
Section 3.8.5.3 thoroughly documents the syntax and behavior of RRULEs (Recurrence rules). They look like
RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
which means
Weekly on Tuesday and Thursday for five weeks:
so you could implement these semantics (or find an existing RFC 5545 library that does it) and your API might look very similar to the RRULE syntax:
ctx.Run(...).Freq(WEEKLY).Count(10).ByDay(TU, TH)