class Repeatable::Expression::DayInMonth
Attributes
day[R]
Public Class Methods
new(day:)
click to toggle source
# File lib/repeatable/expression/day_in_month.rb, line 6 def initialize(day:) @day = day end
Public Instance Methods
include?(date)
click to toggle source
# File lib/repeatable/expression/day_in_month.rb, line 10 def include?(date) if day < 0 date - last_date_of_month(date) - 1 == day else date.day == day end end