Using the precision from the supplied start argument and the its date
value, matches every n number of time units thereafter.
Public Class Methods
new(start,n,precision=nil)click to toggle source
# File lib/runt/temporalexpression.rb, line 682definitialize(start,n,precision=nil)
@start=start@interval=n# Use the precision of the start date by default@precision=precision||@start.date_precisionend
Public Instance Methods
include?(date)click to toggle source
# File lib/runt/temporalexpression.rb, line 689definclude?(date)
i=DPrecision.to_p(@start,@precision)
d=DPrecision.to_p(date,@precision)
whilei<=dreturntrueifi.eql?(d)
i=i+@intervalendfalseend
to_s()click to toggle source
# File lib/runt/temporalexpression.rb, line 699defto_s"every #{@interval} #{@precision.label.downcase}s starting #{Runt.format_date(@start)}"end