class Runt::WIMonth
TExpr that matches the week in a month. For example:
WIMonth.new(1) See also: Date FIXME .dates mixin seems functionally broken
Constants
- VALID_RANGE
Public Class Methods
Source
# File lib/runt/temporalexpression.rb, line 630 def initialize(ordinal) unless VALID_RANGE.include?(ordinal) raise ArgumentError, 'invalid ordinal week of month' end @ordinal = ordinal end
Public Instance Methods
Source
# File lib/runt/temporalexpression.rb, line 637 def include?(date) week_matches?(@ordinal,date) end
Source
# File lib/runt/temporalexpression.rb, line 641 def to_s "#{Runt.ordinalize(@ordinal)} week of any month" end