Skip to main content
Code Review

Return to Answer

replaced http://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc
Source Link

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

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)
lang-cs

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