Skip to main content
Code Review

Return to Revisions

2 of 2
replaced http://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc

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)
Mike Samuel
  • 656
  • 1
  • 7
  • 12
default

AltStyle によって変換されたページ (->オリジナル) /