Module: DayMatcher

Defined in:
lib/natural-date/matcher/day_matcher.rb

Class Method Summary collapse

Class Method Details

.match?(date, reference_date, expression_map) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/natural-date/matcher/day_matcher.rb', line 2

def self.match? date, reference_date, expression_map
  !expression_map[:day] || expression_map[:day].include?(date.day)
end