Sha256: 940971dd084c2fc684908a1be09e92891dd804954004645f724e86549270f222
Contents?: true
Size: 352 Bytes
Versions: 8
Compression:
Stored size: 352 Bytes
Contents
module Montrose class Frequency class Weekly < Frequency def include?(time) weeks_since_start(time) % @interval == 0 end private def weeks_since_start(time) ((time.beginning_of_week - base_date) / 1.week).round end def base_date @starts.beginning_of_week end end end end
Version data entries
8 entries across 8 versions & 1 rubygems