class Runt::REMonth
TExpr that matches a range of dates within a month. For example:
REMonth.(12,28)
matches from the 12th thru the 28th of any month. If end_day==0 or is not given, start_day will define the range with that single day.
See also: Date
Public Class Methods
Source
# File lib/runt/temporalexpression.rb, line 659 def initialize(start_day, end_day=0) end_day=start_day if end_day==0 @range = start_day..end_day end
Public Instance Methods
Source
# File lib/runt/temporalexpression.rb, line 664 def include?(date) @range.include? date.mday end
Source
# File lib/runt/temporalexpression.rb, line 668 def to_s "from the #{Runt.ordinalize(@range.begin)} to the #{Runt.ordinalize(@range.end)} monthly" end