Class: Repeatable::Expression::Biweekly
- Defined in:
- lib/repeatable/expression/biweekly.rb
Instance Method Summary collapse
- #include?(date) ⇒ Boolean
-
#initialize(weekday:, start_after: ::Date.today) ⇒ Biweekly
constructor
A new instance of Biweekly.
Methods inherited from Date
Methods inherited from Base
===, #difference, #intersection, #to_h, #union
Constructor Details
Instance Method Details
#include?(date) ⇒ Boolean
9 10 11 |
# File 'lib/repeatable/expression/biweekly.rb', line 9 def include?(date) date >= start_after && (date - first_occurrence) % 14 == 0 end |