Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @instructions.reject do |instruction|
- unless instruction.frequency == 'weekly'
- p_date = Runt::PDate.day(instruction.start_day.year, instruction.start_day.month, instruction.start_day.mday)
- case instruction.frequency
- when "bi_monthly"
- r = Runt::EveryTE.new(p_date, 14, Runt::DPrecision::DAY)
- when "monthly"
- r = Runt::EveryTE.new(p_date, 28, Runt::DPrecision::DAY)
- end
- if !r.include?(date)
- true
- else
- false
- end
- end
- true
- end
Add Comment
Please, Sign In to add comment