Method: Runt::WeekInterval#initialize
- Defined in:
- lib/runt/temporalexpression.rb
#initialize(start_date, interval = 2) ⇒ WeekInterval
Returns a new instance of WeekInterval.
869 870 871 872 873 874 |
# File 'lib/runt/temporalexpression.rb', line 869 def initialize(start_date,interval=2) @start_date = DPrecision.to_p(start_date,DPrecision::DAY) # convert base_date to the start of the week @base_date = @start_date - @start_date.wday @interval = interval end |